Apparatus and method for controlling insulin infusion with state variable feedback

ABSTRACT

An infusion system, which may be a closed loop, or “semi-closed-loop”, infusion system, uses state variable feedback to control the rate at which fluid is infused into a user&#39;s body. The closed loop system includes a sensor system, a controller, and a delivery system. The “semi-closed-loop” system further includes prompts that provide indications to the user prior to fluid delivery. The sensor system includes a sensor for monitoring a condition of the user and produces a sensor signal which is representative of the user&#39;s condition. The delivery system infuses a fluid into the user at a rate dictated by the commands from the controller. The system may use three state variables, e.g., subcutaneous insulin concentration, plasma insulin concentration, and insulin effect, and corresponding gains, to calculate an additional amount of fluid to be infused with a bolus and to be removed from the basal delivery of the fluid.

RELATED APPLICATION DATA

This application is a continuation of U.S. application Ser. No.11/644,526, filed Dec. 22, 2006, now U.S. Pat. No. 7,806,886, which is acontinuation-in-part of U.S. application Ser. No. 10/816,021, filed Mar.31, 2004, now U.S. Pat. No. 7,402,153, which is a continuation-in-partof U.S. application Ser. No. 09/586,175, filed Jun. 1, 2000, now U.S.Pat. No. 6,558,351, which claims priority to U.S. ProvisionalApplication Ser. No. 60/137,601, filed Jun. 3, 1999 and entitled “ClosedLoop Algorithms For Continuous Monitoring And Insulin Infusion”, andU.S. Provisional Application Ser. No. 60/162,255, filed Oct. 29, 1999and entitled “Closed Loop Algorithms For Continuous Monitoring AndInsulin Infusion,” all of which are specifically incorporated byreference herein.

FIELD

This invention relates to drug delivery systems and more specifically tosystems for controlling the infusion rate of insulin based on statevariable feedback.

BACKGROUND

The pancreas of a normal healthy person produces and releases insulininto the blood stream in response to elevated blood plasma glucoselevels. Beta cells (β-cells), which reside in the pancreas, produce andsecrete the insulin into the blood stream, as it is needed. If β-cellsbecome incapacitated or die, a condition known as Type I diabetesmellitus (or in some cases if β-cells produce insufficient quantities ofinsulin, Type II diabetes), then insulin must be provided to the bodyfrom another source.

Traditionally, since insulin cannot be taken orally, insulin has beeninjected with a syringe. More recently, use of infusion pump therapy hasbeen increasing, especially for delivering insulin for diabetics. Forexample, external infusion pumps are worn on a belt, in a pocket, or thelike, and deliver insulin into the body via an infusion tube with apercutaneous needle or a cannula placed in the subcutaneous tissue. Asof 1995, less than 5% of Type I diabetics in the United States wereusing infusion pump therapy. Presently over 7% of the more than 900,000Type I diabetics in the U.S. are using infusion pump therapy. And thepercentage of Type I diabetics that use an infusion pump is growing atan absolute rate of over 2% each year. Moreover, the number of Type Idiabetics is growing at 3% or more per year. In addition, growingnumbers of insulin using Type II diabetics are also using infusionpumps. Physicians have recognized that continuous infusion providesgreater control of a diabetic's condition, and are also increasinglyprescribing it for patients. Although offering control, pump therapy cansuffer from several complications that make use of traditional externalinfusion pumps less desirable for the user.

In insulin pumps, it is common to use fast acting insulin as opposed tothe slower acting insulin that is used for injections, because pumpsallow changing of insulin profiles. As insulin companies develop fasteracting insulin, the faster acting insulin is often adopted quickly.However, current pumps are still limited by the speed of the insulinthey are using.

SUMMARY

According to an embodiment of the invention, a closed loop infusionsystem and method for controlling blood glucose concentration in thebody of a user is described. Embodiments of the present inventioninclude obtaining a blood glucose level from the body of the user,generating commands by a proportional plus, integral plus, derivative(PID) controller from the obtained glucose level, and infusing a liquidinto the body of the user in response to the commands. In particularembodiments, the PID controller is a bilinear PID controller.

According to another embodiment of the invention, a closed loop infusionsystem is for infusing a fluid into a user. The closed loop infusionsystem includes a sensor system, a controller, and a delivery system.The sensor system includes a sensor for monitoring a condition of theuser. The sensor produces a sensor signal, which is representative ofthe condition of the user, and is used to generate a controller input.The controller uses the controller input to generate commands thataffect the operation of the delivery system. Accordingly, the deliverysystem infuses a liquid into the user. In particular embodiments,glucose concentration is monitored by the sensor system, and the liquiddelivered to the user includes insulin. In preferred embodiments, thesensor system sends a message, generated using the sensor signal, to thedelivery system. The message is used to generate the controller input.In particular embodiments, the sensor is a subcutaneous sensor incontact with interstitial fluid. In further particular embodiments, twoor more sensors are included in the sensor system. Still in furtherembodiments, the blood glucose concentration is obtained through an IVcatheter or a vascular sensor. In addition, in particular embodimentsthe liquid is delivered to through an IV catheter connected to the bodyof the user.

In preferred embodiments, the sensor system is predominately external tothe user's body. And the delivery system is predominately external tothe user's body. In alternative embodiments, the sensor system ispredominately internal to the user's body. In other alternativeembodiments, the delivery system is predominately internal to the user'sbody.

In preferred embodiments, the controller uses a first set of one or morecontroller gains when the glucose concentration is higher than a desiredbasal glucose concentration and the controller uses a second set of oneor more controller gains when the glucose concentration is lower than adesired basal glucose concentration. In alternative embodiments, thecontroller uses a first set of one or more controller gains when theglucose concentration is increasing and a second set of one or morecontroller gains when the glucose concentration is decreasing. Infurther alternative embodiments, the controller uses a first set of oneor more controller gains when the glucose concentration is higher than adesired basal glucose concentration and the glucose concentration isincreasing; and the controller uses a second set of one or morecontroller gains when the glucose concentration is higher than a desiredbasal glucose concentration and the glucose concentration is decreasing;and the controller uses a third set of one or more controller gains whenthe glucose concentration is lower than a desired basal glucoseconcentration and the glucose concentration is increasing; and thecontroller uses a fourth set of one or more controller gains when theglucose concentration is lower than a desired basal glucoseconcentration and the glucose concentration is decreasing.

In preferred embodiments, one or more controller gains are selected suchthat the commands generated by the controller cause the delivery systemto infuse insulin into the body of the user in response to a glucoseconcentration at a rate similar to the rate that beta cells wouldrelease insulin in an individual with a healthy normally functioningpancreas. Alternatively, one or more controller gains are selected sothat the commands generated by the controller cause the delivery systemto infuse insulin into the body of the user in response to a glucoseconcentration at a rate such that the insulin concentration profile inthe user's blood stream is similar to the insulin concentration profilethat would be generated by the release of insulin beta cells in anindividual with a healthy normally functioning pancreas. In otheralternative embodiments, a post-controller lead/lag compensator is usedto modify the commands generated by the controller to cause the deliverysystem to infuse insulin into the body of the user in response to aglucose concentration at a rate such that the insulin concentrationprofile in the user's blood stream is similar to the insulinconcentration profile that would be generated by the release of insulinbeta cells in an individual with a healthy normally functioningpancreas.

In preferred embodiments, one or more controller gains are selected by amethod that includes the step of measuring an insulin response of atleast one individual with a healthy normally functioning pancreas andcalculating the controller gains that cause the commands to generallymatch the insulin response of at least one individual. In particularembodiments, the derivative gain K_(D) is calculated using the firstphase insulin response (φ1) measured from a normal glucose tolerant(NGT) individual. In further particular embodiments, one or morecontroller gains are calculated from a ratio of one or more controllergains.

In preferred embodiments, one or more controller gains include at leastone tuning parameter. In particular embodiments, the tuning parameter isa post-controller lead/lag compensator is used to modify the commandsgenerated by the controller to compensate for an insulin delivery delaydue to infusing insulin into a user' tissue rather than directly intothe user's blood stream. In additional embodiments, the tuning parameteris an integrator clip. In still further embodiments, the tuningparameter is a feedback of predicted plasma insulin. In yet furtherembodiments, the tuning parameter is an integrator leak.

In alternative embodiments, the controller is influenced by inputs ofmore than one measured body characteristic. For example, measured bodycharacteristics that might be used to influence the controller includeone or more amino acid concentrations, one or more gastrointestinalhormone concentrations, one or more other hormone concentrations, bloodpH, interstitial fluid (ISF) pH, one or more blood glucoseconcentrations, and one or more interstitial fluid (ISF) glucoseconcentrations. In particular embodiments, the sensor is a multi-sensorthat measures both glucose concentration and pH.

In preferred embodiments, the sensor system produces a diagnostic signalin addition to the sensor signal, and the diagnostic signal is used toindicate when the sensor signal accuracy has diminished.

In further embodiments, a method of infusing fluid, such as insulin,into a body of a user is provided that uses state variable feedback. Themethod comprises delivering a basal amount of insulin at a predeterminedbasal rate, determining at least one state variable, determining, basedon the state variable(s), an additional amount of insulin to bedelivered to the body of the user with the bolus amount of insulin,infusing the bolus the additional amount of insulin to the user, andreducing the basal rate by the additional amount of insulin deliveredwith the bolus. The method may further include using a PID controller todetermine the bolus amount of insulin to be delivered to the user, basedon a blood glucose concentration. The method may be used with aclosed-loop or “semi-closed loop” delivery algorithm.

Other features and advantages of the invention will become apparent fromthe following detailed description, taken in conjunction with theaccompanying drawings which illustrate, by way of example, variousfeatures of embodiments of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

A detailed description of embodiments of the invention will be made withreference to the accompanying drawings, wherein like numerals designatecorresponding parts in the several figures.

FIG. 1 is a block diagram of a closed loop glucose control system inaccordance with an embodiment of the present invention.

FIG. 2 is a front view of closed loop hardware located on a body inaccordance with an embodiment of the present invention.

FIG. 3A is a perspective view of a glucose sensor system for use in anembodiment of the present invention.

FIG. 3B is a side cross-sectional view of the glucose sensor system ofFIG. 3A.

FIG. 3C is a perspective view of a sensor set of the glucose sensorsystem of FIG. 3A for use in an embodiment of the present invention.

FIG. 3D is a side cross-sectional view of the sensor set of FIG. 3C.

FIG. 4 is a cross sectional view of a sensing end of the sensor of FIG.3D.

FIG. 5 is a top view of an infusion device with a reservoir door in theopen position, for use in an embodiment of the present invention.

FIG. 6 is a side view of an infusion set with the insertion needlepulled out, for use in an embodiment of the present invention.

FIG. 7 is a circuit diagram of a sensor and its power supply inaccordance with an embodiment of the present invention.

FIG. 8A is a diagram of a single device and its components in accordancewith an embodiment of the present invention.

FIG. 8B is a diagram of two devices and their components in accordancewith an embodiment of the present invention.

FIG. 8C is another diagram of two devices and their components inaccordance with an embodiment of the present invention.

FIG. 8D is a diagram of three devices and their components in accordancewith an embodiment of the present invention.

FIG. 9 is a table listing the devices of FIGS. 8A-D and theircomponents.

FIG. 10 is a block diagram of the glucose sensor system of FIG. 3A.

FIG. 11A is a detailed block diagram of an A/D converter for the glucosesensor system of FIG. 10 in accordance with an embodiment of the presentinvention.

FIG. 11B is a detailed block diagram of the A/D converter for theglucose sensor system of FIG. 10 with a pulse duration output selectionoption in accordance with an embodiment of the present invention.

FIG. 12 is a circuit diagram of an I-F A/D converter of FIG. 10accompanied by charts of node signals in accordance with an embodimentof the present invention.

FIG. 13 is another circuit diagram of an I-F A/D converter of FIG. 10accompanied by charts of node signals in accordance with an embodimentof the present invention.

FIG. 14 is still another circuit diagram of an I-F A/D converter of FIG.10 accompanied by charts of node signals in accordance with anembodiment of the present invention.

FIG. 15 is a circuit diagram of an I-V A/D converter of FIG. 10 inaccordance with an embodiment of the present invention.

FIG. 16 is a block diagram of the glucose sensor system of FIG. 10 witha pre-filter and a filter in accordance with an embodiment of thepresent invention.

FIG. 17 is a chart of an example of a pre-filter of FIG. 16 and itseffects on digital sensor values Dsig in accordance with an embodimentof the present invention.

FIG. 18 is frequency response chart for a filter of FIG. 16 inaccordance with an embodiment of the present invention.

FIG. 19A is a plot of a filtered and an unfiltered sensor signal overtime in accordance with an embodiment of the present invention.

FIG. 19B is close up of a section of the plot of FIG. 19A in accordancewith an embodiment of the present invention.

FIG. 20 is a cross-sectional view of a sensor set and an infusion setattached to the body in accordance with an embodiment of the presentinvention.

FIG. 21 is a frequency response chart of a time delay correcting Weinerfilter in accordance with an embodiment of the present invention.

FIG. 22 is a plot of a digital sensor values Dsig before and after timedelay correction compared to actual glucose measurements over time inaccordance with an embodiment of the present invention.

FIG. 23A is a diagram of a glucose clamp (glucose level with respect totime).

FIG. 23B is a plot of insulin concentration in a normal glucose tolerant(NGT) individual in response to various magnitudes of glucose clamps ofFIG. 23A.

FIG. 24A is a diagram of a glucose clamp.

FIG. 24B is a diagram of a proportional insulin response to the glucoseclamp of FIG. 24A in accordance with an embodiment of the presentinvention.

FIG. 24C is a diagram of an integral insulin response to the glucoseclamp of FIG. 24A in accordance with an embodiment of the presentinvention.

FIG. 24D is a diagram of a derivative insulin response to the glucoseclamp of FIG. 24A in accordance with an embodiment of the presentinvention.

FIG. 24E is a diagram of a combined proportional, integral, andderivative insulin response to the glucose clamp of FIG. 24A inaccordance with an embodiment of the present invention.

FIG. 25A is a plot of insulin responses to a glucose clamp for exercisetrained and normal individuals.

FIG. 25B is a bar chart of glucose uptake rates for exercise trained andnormal individuals.

FIG. 26 is a block diagram of a closed loop system to control bloodglucose levels through insulin infusion based on glucose level feedbackin accordance with an embodiment of the present invention.

FIG. 27 is a detailed block diagram of the portion of the control loopof FIG. 26 that is in the body in accordance with an embodiment of thepresent invention.

FIGS. 28A and 28B are plots of measured insulin responses of twodifferent normal glucose tolerant (NGT) individuals to a glucose clampfor use with an embodiment of the present invention.

FIG. 29A is a plot of two different glucose sensor outputs compared toglucose meter readings during a glucose clamp in accordance with anembodiment of the present invention.

FIG. 29B is a plot of actual insulin concentration in blood compared toa controller commanded insulin concentration in response to the glucoseclamp of FIG. 29A in accordance with an embodiment of the presentinvention.

FIG. 30 is a top view of an end of a multi-sensor for measuring bothglucose concentration and pH in accordance with an embodiment of thepresent invention.

FIG. 31A is a representative drawing of blood glucose compared to sensormeasured blood glucose over time in accordance with an embodiment of thepresent invention.

FIG. 31B is a representative drawing of sensor sensitivity over the sameperiod of time as FIG. 31A in accordance with an embodiment of thepresent invention.

FIG. 31C is a representative drawing of sensor resistance over the sameperiod of time as FIG. 31A in accordance with an embodiment of thepresent invention.

FIG. 32 is a block diagram using the derivative of sensor resistance todetermine when to recalibrate or replace the sensor in accordance withan embodiment of the present invention.

FIG. 33A is a plot of an analog sensor signal Isig over time inaccordance with an embodiment of the present invention.

FIG. 33B is a plot of sensor resistance over the same period of time asFIG. 32A in accordance with an embodiment of the present invention.

FIG. 33C is a plot of the derivative of the sensor resistance of FIG.32B in accordance with an embodiment of the present invention.

FIG. 34A is a bottom view of a telemetered characteristic monitor inaccordance with an embodiment of the present invention.

FIG. 34B is a bottom view of a different telemetered characteristicmonitor in accordance with an embodiment of the present invention.

FIG. 35A is a drawing of a blood plasma insulin response to a glucoseclamp in a normal glucose tolerant (NGT) individual in accordance withan embodiment of the present invention.

FIG. 35B is a drawing of the blood plasma insulin response of FIG. 35Awhen delayed due to insulin being delivered to the subcutaneous tissueinstead of directly into the blood stream in accordance with anembodiment of the present invention.

FIG. 36A is a drawing of blood plasma insulin concentration over timeafter an insulin bolus is delivered directly into the blood stream inaccordance with an embodiment of the present invention.

FIG. 36B is a drawing of a blood plasma insulin concentration over timeafter an insulin bolus is delivered into the subcutaneous tissue inaccordance with an embodiment of the present invention.

FIG. 37 is a block diagram of the closed loop system of FIG. 26 with theaddition of a post-controller compensator and a derivative filter inaccordance with an embodiment of the present invention.

FIG. 38A is a plot of sensor signal measurements and Via measurementswith respect to time in accordance with an embodiment of the presentinvention.

FIG. 38B is a plot of a measured counter electrode voltage Vcnt withrespect to time in accordance with an embodiment of the presentinvention.

FIG. 38C is a plot of calculated sensor sensitivity with respect to timein accordance with an embodiment of the present invention.

FIG. 38D is a plot of a calculation of sensor resistance Rs₁ withrespect to time in accordance with an embodiment of the presentinvention.

FIG. 38E is a plot of another calculation of sensor resistance Rs₂ withrespect to time in accordance with an embodiment of the presentinvention.

FIG. 38F is a plot of the derivative of sensor resistance Rs₁ of FIG.38D with respect to time in accordance with an embodiment of the presentinvention.

FIG. 38G is a plot of the derivative of the sensor resistance Rs₂ ofFIG. 38E with respect to time in accordance with an embodiment of thepresent invention.

FIG. 38H is a plot of when sensors were replaced with respect to time inaccordance with an embodiment of the present invention.

FIGS. 39A and 39B are a block diagrams of a closed loop glucose controlsystem in accordance with embodiments of the present invention.

FIG. 40 is a block diagram of auto blood withdrawal and return inaccordance with an embodiment of the present invention.

FIG. 41A is a plot actual blood glucose concentration in accordance withan embodiment of the present invention.

FIG. 41B is a plot of actual insulin concentration in blood compared toa controller commanded insulin concentration in response to the bloodglucose in FIG. 41A in accordance with an embodiment of the presentinvention.

FIG. 42 illustrates a control feedback block diagram of state variablefeedback and in accordance with an embodiment of the present invention.

FIG. 43 is a plot of basal insulin delivery rate over time usingdifferent control gains in accordance with embodiments of the presentinvention.

FIG. 44 is a plot of subcutaneous insulin over time using differentcontrol gains in accordance with embodiments of the present invention.

FIG. 45 is a plot of plasma insulin over time using different controlgains in accordance with embodiments of the present invention.

FIG. 46 is a plot of insulin effect over time using different controlgains in accordance with embodiments of the present invention.

FIG. 47 is a plot of simulated glucose concentration over time using aPID controller with state variable feedback and a PID controller withoutstate variable feedback in accordance with embodiments of the presentinvention.

FIG. 48 is a plot of simulated insulin delivery over time using a PIDcontroller with state variable feedback and a PID controller withoutstate variable feedback in accordance with embodiments of the presentinvention.

DETAILED DESCRIPTION

As shown in the drawings for purposes of illustration, the invention isembodied in a closed loop infusion system for regulating the rate offluid infusion into a body of a user based on feedback from an analyteconcentration measurement taken from the body. In particularembodiments, the invention is embodied in a control system forregulating the rate of insulin infusion into the body of a user based ona glucose concentration measurement taken from the body. In preferredembodiments, the system is designed to model a pancreatic beta cell(β-cell). In other words, the system controls an infusion device torelease insulin into a body of a user in a similar concentration profileas would be created by fully functioning human β-cells when respondingto changes in blood glucose concentrations in the body.

Thus, the system simulates the body's natural insulin response to bloodglucose levels and not only makes efficient use of insulin, but alsoaccounts for other bodily functions as well since insulin has bothmetabolic and mitogenic effects. However, the algorithms must model theβ-cells closely, since algorithms that are designed to minimize glucoseexcursions in the body, without regard for how much insulin isdelivered, may cause excessive weight gain, hypertension, andatherosclerosis. In preferred embodiments of the present invention, thesystem is intended to emulate the in vivo insulin secretion pattern andto adjust this pattern consistent with the in vivo β-cell adaptationexperienced by normal healthy individuals. The in vivo β-cell responsein subjects with normal glucose tolerance (NGT), with widely varyinginsulin sensitivity (S_(I)), is the optimal insulin response for themaintenance of glucose homeostasis.

Preferred embodiments include a glucose sensor system 10, a controller12 and an insulin delivery system 14, as shown in FIG. 1. The glucosesensor system 10 generates a sensor signal 16 representative of bloodglucose levels 18 in the body 20, and provides the sensor signal 16 tothe controller 12. The controller 12 receives the sensor signal 16 andgenerates commands 22 that are communicated to the insulin deliverysystem 14. The insulin delivery system 14 receives the commands 22 andinfuses insulin 24 into the body 20 in response to the commands 22.

Generally, the glucose sensor system 10 includes a glucose sensor,sensor electrical components to provide power to the sensor and generatethe sensor signal 16, a sensor communication system to carry the sensorsignal 16 to the controller 12, and a sensor system housing for theelectrical components and the sensor communication system.

Typically, the controller 12 includes controller electrical componentsand software to generate commands for the insulin delivery system 14based on the sensor signal 16, and a controller communication system toreceive the sensor signal 16 and carry commands to the insulin deliverysystem 14.

Generally, the insulin delivery system 14 includes an infusion deviceand an infusion tube to infuse insulin 24 into the body 20. Inparticular embodiments, the infusion device includes infusion electricalcomponents to activate an infusion motor according to the commands 22,an infusion communication system to receive the commands 22 from thecontroller 12, and an infusion device housing to hold the infusiondevice.

In preferred embodiments, the controller 12 is housed in the infusiondevice housing and the infusion communication system is an electricaltrace or a wire that carries the commands 22 from the controller 12 tothe infusion device. In alternative embodiments, the controller 12 ishoused in the sensor system housing and the sensor communication systemis an electrical trace or a wire that carries the sensor signal 16 fromthe sensor electrical components to the controller electricalcomponents. In other alternative embodiments, the controller 12 has itsown housing or is included in a supplemental device. In anotheralternative embodiment, the controller is located with the infusiondevice and the sensor system all within one housing. In furtheralternative embodiments, the sensor, controller, and/or infusioncommunication systems may utilize a cable, a wire, fiber optic lines,RF, IR, or ultrasonic transmitters and receivers, or the like instead ofthe electrical traces.

SYSTEM OVERVIEW

Preferred embodiments of the invention include a sensor 26, a sensor set28, a telemetered characteristic monitor 30, a sensor cable 32, aninfusion device 34, an infusion tube 36, and an infusion set 38, allworn on the body 20 of a user, as shown in FIG. 2. The telemeteredcharacteristic monitor 30 includes a monitor housing 31 that supports aprinted circuit board 33, batteries 35, antenna (not shown), and asensor cable connector (not shown), as seen in FIGS. 3A and 3B. Asensing end 40 of the sensor 26 has exposed electrodes 42 and isinserted through skin 46 into a subcutaneous tissue 44 of a user's body20, as shown in FIGS. 3D and 4. The electrodes 42 are in contact withinterstitial fluid (ISF) that is present throughout the subcutaneoustissue 44. The sensor 26 is held in place by the sensor set 28, which isadhesively secured to the user's skin 46, as shown in FIGS. 3C and 3D.The sensor set 28 provides for a connector end 27 of the sensor 26 toconnect to a first end 29 of the sensor cable 32. A second end 37 of thesensor cable 32 connects to the monitor housing 31. The batteries 35included in the monitor housing 31 provide power for the sensor 26 andelectrical components 39 on the printed circuit board 33. The electricalcomponents 39 sample the sensor signal 16 and store digital sensorvalues (Dsig) in a memory and then periodically transmit the digitalsensor values Dsig from the memory to the controller 12, which isincluded in the infusion device.

The controller 12 processes the digital sensor values Dsig and generatescommands 22 for the infusion device 34. Preferably, the infusion device34 responds to the commands 22 and actuates a plunger 48 that forcesinsulin 24 out of a reservoir 50 located inside the infusion device 34,as shown in FIG. 5. In particular embodiments, a connector tip 54 of thereservoir 50 extends through the infusion device housing 52 and a firstend 51 of the infusion tube 36 is attached to the connector tip 54. Asecond end 53 of the infusion tube 36 connects to the infusion set 38.Insulin 24 is forced through the infusion tube 36 into the infusion set38 and into the body 16. The infusion set 38 is adhesively attached tothe user's skin 46, as shown in FIG. 6. As part of the infusion set 38,a cannula 56 extends through the skin 46 and terminates in thesubcutaneous tissue 44 completing fluid communication between thereservoir 50 and the subcutaneous tissue 44 of the user's body 16.

In alternative embodiments, the closed-loop system can be a part of ahospital-based glucose management system. Given that insulin therapyduring intensive care has been shown to dramatically improve woundhealing, reduce blood stream infections, renal failure, andpolyneuropathy mortality, irrespective of whether subjects previouslyhad diabetes (See Van den Berghe G. et al. NEJM 345: 1359-67, 2001,which is incorporated by reference herein), the present invention can beused in this hospital setting to control the blood glucose level of apatient in intensive care. In these alternative embodiments, since an IVhookup is typically implanted into a patient's arm while the patient isin an intensive care setting (e.g. ICU), a closed loop glucose controlcan be established which piggy-backs off the existing IV connection.Thus, in a hospital based system, intravenous (IV) catheters which aredirectly connected to a patient vascular system for purposes of quicklydelivering IV fluids, can also be used to facilitate blood sampling anddirect infusion of substances (e.g. insulin, anticoagulants) into theintra-vascular space. Moreover, glucose sensors may be inserted throughthe IV line to give real-time glucose levels from the blood stream.Therefore, depending on the type of hospital based system, thealternative embodiments would not necessarily need the described systemcomponents such as the sensor 26, the sensor set 28, the telemeteredcharacteristic monitor 30, the sensor cable 32, the infusion tube 36,and the infusion set 38 as described in the preferred embodiments.Instead, standard blood glucose meters or vascular glucose sensors asdescribed in co-pending provisional application entitled “Multi-lumenCatheter,” filed Sep. 27, 2002, Ser. No. 60/414,248, which isincorporated herein in its entirety by reference, can be used to providethe blood glucose values to the infusion pump control and the existingIV connection can be used to administer the insulin to the patient.

It is important to appreciate that numerous combinations of devices inthe hospital-based system can be used with the closed loop controller ofthe present invention. For example, as described in FIG. 39B compared tothe preferred system in FIG. 39A, an auto blood glucose/intravenousinsulin infusion system can automatically withdraw and analyze blood forglucose concentration at fixed intervals (preferably 5-20 minutes),extrapolate the blood glucose values at a more frequent interval(preferably 1 minute), and use the extrapolated signal for calculatingan iv-insulin infusion according to the controller described below. Themodified auto blood glucose/intravenous insulin infusion system wouldeliminate the need for subcutaneous sensor compensation and subcutaneousinsulin compensation (as described with regards to the lead-lagcompensator below). The automatic withdrawal of blood, and subsequentglucose determination can be accomplished with existing technology (e.g.VIA or Biostator like blood glucose analyzer) or by the system describedin FIG. 40. The system in FIG. 40 uses a peristaltic pump 420 towithdraw blood across an amperometric sensor 410 (the same technology asused in sensor 26) and then return the blood with added flush (0.5 to1.0 ml) from the reservoir 400. The flush can consist of any makeup ofsaline, heparin, glucose solution and/or the like. If the blood samplesare obtained at intervals longer than 1 minute but less than 20 minutes,the blood glucose determinations can be extrapolated on aminute-to-minute basis with extrapolation based on the present (n) andprevious values (n−1) to work with the logic of the controller asdescribed in detail below. For blood samples obtained at intervalsgreater than 20 minutes, a zero-order-hold would be used for theextrapolation. Based on these blood glucose values, the infusion devicecan administer insulin based on the closed loop controller described ingreater detail below.

In other modifications to the system, a manual blood glucose/intravenousinsulin infusion system can be used where frequent manual entry of bloodglucose values from a standard blood glucose meter (e.g. YSI, Beckman,etc) and extrapolate the values at more frequent intervals (preferably 1min) to create a surrogate signal for calculating IV-insulin infusion.Alternatively, a sensor blood glucose/intravenous insulin infusionsystem can use a continuous glucose sensor (e.g. vascular, subcutaneous,etc.) for frequent blood glucose determination. Moreover, the insulininfusion can be administered subcutaneously rather than intravenously inany one of the previous examples according to the controller describedbelow.

In still further alternative embodiments, the system components may becombined in a smaller or greater number of devices and/or the functionsof each device may be allocated differently to suit the needs of theuser.

Controller

Once the hardware for a closed loop system is configured, such as in thepreferred embodiments described above, the affects of the hardware on ahuman body are determined by the controller. In preferred embodiments,the controller 12 is designed to model a pancreatic beta cell (β-cell).In other words, the controller 12 commands the infusion device 34 torelease insulin 24 into the body 20 at a rate that causes the insulinconcentration in the blood to follow a similar concentration profile aswould be caused by fully functioning human β-cells responding to bloodglucose concentrations in the body 20. In further embodiments, a“semi-closed-loop” system may be used, in which the user is prompted toconfirm insulin delivery before any insulin is actually delivered.

A controller that simulates the body's natural insulin response to bloodglucose levels not only makes efficient use of insulin but also accountsfor other bodily functions as well since insulin has both metabolic andmitogenic effects. Controller algorithms that are designed to minimizeglucose excursions in the body without regard for how much insulin isdelivered may cause excessive weight gain, hypertension, andatherosclerosis. In preferred embodiments, of the present invention, thecontroller 22 is intended to emulate the in vivo insulin secretionpattern and to adjust this pattern to be consistent with in vivo β-celladaptation. The in vivo β-cell response in subjects with normal glucosetolerance (NGT), with widely varying insulin sensitivity (S_(I)), is theoptimal insulin response for the maintenance of glucose homeostasis.

The β-Cell and PID Control

Generally, the in vivo β-cell response to changes in glucose ischaracterized by “first” and “second” phase insulin responses (45). Thisbiphasic insulin response is clearly seen during hyperglycemic clampsapplied to NGT subjects, as shown in FIG. 23B. During a hyperglycemicclamp the glucose level is rapidly increased from a basal level G_(B) toa new higher level G_(C) and then held constant at the higher-levelG_(C) as shown in FIG. 23A. The magnitude of the increase in glucose(ΔG) affects the insulin response. Four insulin response curves areshown for four different glucose clamp levels in FIG. 23B.

The biphasic insulin response of a β-cell can be modeled usingcomponents of a proportional, plus integral, plus derivative (PID)controller. A PID controller is selected since PID algorithms are stablefor a wide variety of non-medical dynamic systems, and PID algorithmshave been found to be stable over widely varying disturbances andchanges in system dynamics.

The insulin response of β-cells during a hyperglycemic clamp isdiagrammed in FIGS. 24A-E using the components of a PID controller tomodel the β-cell. A proportional component U_(P) and a derivativecomponent U_(D) of the PID controller may be combined to represent afirst phase insulin response 440, which lasts several minutes. Aintegral component U_(I) of the PID controller represents a second phaseinsulin response 442, which is a steady increase in insulin releaseunder hyperglycemic clamp conditions. The magnitude of each component'scontribution to the insulin response is described by the followingequations:

Proportional  Component  Response:  U_(P) = K_(P)(G − G_(B)), Integral  Component  Response:  U_(I) = K_(I)∫_(t_(o))^(t)(G − G_(B))𝕕t + I_(B), and${{{Derivative}\mspace{14mu}{Component}\mspace{14mu}{Response}\text{:}\mspace{14mu} U_{D}} = {K_{D}\frac{\mathbb{d}G}{\mathbb{d}t}}},$

-   -   Where U_(P) is the proportional component of the command sent to        the insulin delivery system,        -   U_(I) is the integral component of the command sent to the            insulin delivery system,        -   U_(D) is the derivative component of the command sent to the            insulin delivery system,        -   K_(P) is a proportional gain coefficient,        -   K_(I) is a integral gain coefficient,        -   K_(D) is a derivative gain coefficient.        -   G is a present blood glucose level,        -   G_(B) is a desired basal glucose level,        -   t is the time that has passed since the last sensor            calibration,        -   t₀ is the time of the last sensor calibration, and        -   I_(B) is a basal insulin concentration at t₀ or can also be            described as U_(I)(t₀)

The combination of the PID components that model the two phases ofinsulin response by a β-cell is shown in FIG. 24E as it responds to thehyperglycemic clamp of FIG. 24A. FIG. 24E shows that the magnitude ofthe first phase response 440 is driven by the derivative andproportional gains, K_(D) and K_(P). And the magnitude of the secondphase response 442 is driven by the integral gain K_(I).

The components of the PID controller can also be expressed in itsdiscrete form:Proportional Component Response: P _(con) ^(n) =K _(P)(SG _(f) ^(n) −G_(sp)),Integral Component Response: I _(con) ^(n) =I _(con) ^(n−1) +K _(I)(SG_(f) ^(n) −G _(sp)); I _(con) ⁰ =I _(b), andDerivative Component Response: D _(con) ^(n) =K _(D) dGdt _(f) ^(n),Where K_(P), K_(I), and K_(D) are the proportional, integral, andderivative gain coefficients, SG_(f) and dGdt_(f) are the filteredsensor glucose and derivative respectively, and the superscript n refersto discrete time.

An acute insulin response is essential for preventing wide postprandialglycemic excursions. Generally, an early insulin response to a suddenincrease in glucose level results in less total insulin being needed tobring the glucose level back to a desired basal glucose level. This isbecause the infusion of insulin increases the percentage of glucose thatis taken up by the body. Infusing a large amount of insulin to increasethe percentage of glucose uptake while the glucose concentration is highresults in an efficient use of insulin. Conversely, infusing a largeamount of insulin while the glucose concentration is low results inusing a large amount of insulin to remove a relatively small amount ofglucose. In other words, a larger percentage of a big number is morethan a larger percentage of a small number. The infusion of less totalinsulin helps to avoid development of insulin resistance in the user. Aswell, first-phase insulin is thought to result in an early suppressionof hepatic glucose output.

Insulin sensitivity is not fixed and can change dramatically in a bodydepending on the amount of exercise by the body. In one study, forexample, insulin responses in highly exercise-trained individuals(individuals who trained more than 5 days a week) were compared to theinsulin responses in subjects with normal glucose tolerance (NGT) duringa hyperglycemic clamp. The insulin response in exercise-trainedindividuals 444 was about ½ of the insulin response of the NGT subjects446, as shown in FIG. 25A. But the glucose uptake rate for each of theindividuals (exercise-trained 448 or normal 450) was virtuallyidentical, as shown in FIG. 25B. Thus, it can be speculated that theexercise-trained individuals have twice the insulin sensitivity and halfof the insulin response leading to the same glucose uptake as the NGTindividuals. Not only is the first phase insulin response 440 reduceddue to the effects of exercise, but the second phase insulin response442 has also been shown to adjust to insulin sensitivity, as can be seenin FIG. 25A.

In preferred embodiments, a closed loop control system may be used fordelivering insulin to a body to compensate for β-cells that perforininadequately. There is a desired basal blood glucose level G_(B) foreach body. The difference between the desired basal blood glucose levelG_(B) and an estimate of the present blood glucose level G is theglucose level error G_(E) that must be corrected. The glucose levelerror G_(E) is provided as an input to the controller 12, as shown inFIG. 26.

If the glucose level error G_(E) is positive (meaning that the presentestimate of the blood glucose level G is higher than the desired basalblood glucose level G_(B)) then the controller 12 generates an insulindelivery command 22 to drive the infusion device 34 to provide insulin24 to the body 20. In terms of the control loop, glucose is consideredto be positive, and therefore insulin is negative. The sensor 26 sensesthe ISF glucose level and generates a sensor signal 16. The sensorsignal 16 is filtered and calibrated to create an estimate of thepresent blood glucose level 452. In particular embodiments, the estimateof the present blood glucose level G is adjusted with correctionalgorithms 454 before it is compared to the desired basal blood glucoselevel G_(B) to calculate a new glucose level error G_(E) to start theloop again.

If the glucose level error G_(E) is negative (meaning that the presentestimate of the blood glucose level is lower than the desired basalblood glucose level G_(B)) then the controller 12 reduces or stops theinsulin delivery depending on whether the integral component response ofthe glucose error G_(E) is still positive.

If the glucose level error G_(E) is zero, (meaning that the presentestimate of the blood glucose level is equal to the desired basal bloodglucose level G_(B)) then the controller 12 may or may not issuecommands to infuse insulin depending on the derivative component(whether the glucose level is raising or falling) and the integralcomponent (how long and by how much glucose level has been above orbelow the basal blood glucose level G_(B)). In “semi-closed loop”embodiments, the user is prompted before the controller 12 issues thecommands to infuse insulin. The prompts may be displayed to the user ona display, sounded to the user, or otherwise provide an indication tothe user that the system is ready to deliver insulin, for example avibration or other tactile indication. In addition, the amount ofinsulin to be delivered may be displayed, with or without otherinformation, such as the total amount infused for the day or thepotential effect on the user's blood glucose level by the insulindelivery. In response, the user may indicate that the insulin should orshould not be delivered, for example by selecting a button, key, orother input. In further embodiments, there must be at least twokeystrokes so that insulin is not delivered by accident.

To more clearly understand the effects that the body has on the controlloop, a more detailed description of the physiological affects thatinsulin has on the glucose concentration in the interstitial fluid (ISF)is needed. In preferred embodiments, the infusion device 34 deliversinsulin through the cannula 56 of the infusion set 38 into the ISF ofthe subcutaneous tissue 44 of the body 20. And the insulin 24 diffusesfrom the local ISF surrounding the cannula into the blood plasma andthen spreads throughout the body 20 in the main circulatory system, asdescribed in the block diagram of FIG. 27. The insulin then diffusesfrom the blood plasma into the interstitial fluid ISF substantiallythrough out the entire body. The insulin 24 binds with and activatesmembrane receptor proteins on cells of body tissues. This facilitatesglucose permeation into the activated cells. In this way, the tissues ofthe body 20 take up the glucose from the ISF. As the ISF glucose leveldecreases, glucose diffuses from the blood plasma into the ISF tomaintain glucose concentration equilibrium. Finally, the glucose in theISF permeates the sensor membrane and affects the sensor signal 16.

In addition, insulin has direct and indirect affects on liver glucoseproduction. Increased insulin concentration decreases liver glucoseproduction. Therefore, acute and immediate insulin response not onlyhelps the body to efficiently take up glucose but also substantiallystops the liver from adding to the glucose in the blood stream. Inalternative embodiments, insulin is delivered more directly into theblood stream instead of into the interstitial fluid, such as deliveryinto veins, arteries, the peritoneal cavity, or the like. And therefore,any time delay associated with moving the insulin from the interstitialfluid into the blood plasma is diminished. In other alternativeembodiments, the glucose sensor is in contact with blood or body fluidsother than interstitial fluid, or the glucose sensor is outside of thebody and measures glucose through a non-invasive means. The embodimentsthat use alternative glucose sensors may have shorter or longer delaysbetween the blood glucose level and the measured blood glucose level.

Selecting Controller Gains

In preferred embodiments, the controller gains K_(P), K_(I), and K_(D),are selected so that the commands from the controller 12 cause theinfusion device 34 to release insulin 24 into the body 20 at a rate,that causes the insulin concentration in the blood to follow a similarconcentration profile, as would be caused by fully functioning humanβ-cells responding to blood glucose concentrations in the body. Inpreferred embodiments, the gains may be selected by observing theinsulin response of several normal glucose tolerant (NGT) individuals,with healthy normally functioning β-cells. The first step in determininga set of controller gains is to take periodic measurements of bloodglucose and blood insulin concentrations from the group of NGTindividuals. Second, each individual in the group is subjected to ahyperglycemic clamp, while continuing to periodically measure and recordthe blood glucose and blood insulin concentrations. Third, a leastsquares curve fit is applied to the recorded blood insulinconcentrations measured over time for each individual. The result is aset of curves representing the insulin responses to the hyperglycemicclamp for each individual of the group. Fourth, the curves are used tocalculate the controller gains K_(P), K_(I), and K_(D), for eachindividual. And finally, the proportional gains from each of theindividuals are averaged together to obtain an average proportionalgain, K_(P), to be used in a controller 12. Similarly, the integralgains, K_(I) and the derivative gains, K_(D), are averaged to obtain anaverage integral gain, K_(I), and an average derivative gain, K_(D), forthe controller 12. Alternatively, other statistical values may be usedinstead of averages such as, maximums, minimums, the high or low one,two or three sigma standard deviation values, or the like. The gainscalculated for various individuals in a group may be filtered to removeanomalous data points before statistically calculating the gains to beused in a controller.

In an example, a least squares curve-fitting method is used to generaterepresentative insulin response curves from two fasted individuals in agroup, as shown in FIGS. 28A and B. Then the controller gains werecalculated from the insulin response curves of the two representativeindividuals and are shown in Table 1. When calculating the controllergains, the insulin clearance rate (k), was assumed to be 10 (ml ofinsulin)/min/(kg. of body weight). The insulin clearance rate k is therate that insulin is taken out of the blood stream in a body. Finally,the average value for each type of gain is calculated using themeasurements from the group, as shown in Table 1.

TABLE 1 PID Controller Gains Calculated From The Insulin Response CurvesOf Two NGT Individuals. Integral Gain, Derivative Gain, IndividualsProportional Gain, K_(P) K_(I) K_(D) a 0.000406 0.005650 0.052672 b0.000723 0.003397 0.040403 Average 0.000564 0.004523 0.046537

The controller gains may be expressed in various units and/or may bemodified by conversion factors depending on preferences for British orS. I. Units, floating-point or integer software implementation, thesoftware memory available, or the like. The set of units for thecontroller gains in Table 1 is:

K_(P): (mU of insulin)/min/(Kg of body weight) per (mg of glucose)/(dlof plasma);

K_(I): (mU of insulin)/min/(Kg of body weight) per (mg of glucose)/(dlof plasma) min.; and

K_(D): (mU of insulin)/min/(Kg of body weight) per (mg of glucose)/(dlof plasma)/min

In alternative embodiments, other curve fitting methods are used togenerate the insulin response curves from the measurements of bloodinsulin concentrations.

An estimate of an insulin clearance rate (k), the individual's bodyweight (W), and the insulin sensitivity S_(I) are needed to calculatethe controller gains from the insulin response curves for each NGTindividual. The insulin clearance rate (k) is generally proportional tobody weight and is well documented in literature. The individual'sinsulin sensitivity S_(I) may be measured using an intravenous glucosetolerance test, a hyperinsulinemic clamp, or in the case of a diabetic,comparing the individual's daily insulin requirement to their dailycarbohydrate intake.

In particular embodiments, two parameters, the insulin sensitivity S_(I)and the insulin clearance rate k, are measured for each individual. Inother embodiments, the insulin clearance rate k is estimated fromliterature given the individual's body weight. In other particularembodiments, longer or shorter insulin clearance times are used. Instill other embodiments, all of the parameters are estimated. Inadditional embodiments, one or more parameters are measured, while atleast one parameter is estimated from literature.

In other alternative embodiments, the controller gains are calculatedusing a group of individuals with similar body types. For example, theinsulin response to a hyperglycemic clamp may be measured for severaltall, thin, NGT, males in order to calculate the controller insulinresponse gains for each individual in the group. Then the gains arestatistically combined to generate a set of representative controllergains for tall, thin, NGT, males. The same could be done for othergroups such as, but not limited to, short, heavy, NGT, females; mediumheight, medium weight, highly exercised trained, females; average heightand weight 10 year olds; or the like. Then the controller gains areselected for each individual user based on the group that bestrepresents them. In further alternative embodiments, controller gainsare uniquely selected for each individual user. In particularembodiments, the controller gains for a user are selected based onmeasurements of insulin sensitivity, insulin clearing time, insulinappearance time, insulin concentration, body weight, body fatpercentage, body metabolism, or other body characteristics such aspregnancy, age, heart conditions, or the like.

In other alternative embodiments, the controller gains are estimated asa function of a user's body weight W and insulin sensitivity S_(I). Aseries of observations are used to justify this method. The firstobservation is that the controller gains are proportional to each other.In other words, small changes in glucose concentration cause a smallderivative response U_(D), a small proportional response U_(P) and asmall integral response U_(I). And larger changes in glucoseconcentration cause a proportionally larger derivative response U_(D), aproportionally larger proportional U_(P) response and a proportionallylarger integral response U_(I), as shown in FIG. 23B. Changes in theglucose concentration proportionally affect all three components of thecontroller response U_(PID). The second observation is that the firstphase insulin response (φ1) is proportional to the derivative gainK_(D). And the third observation is that two constants may be readilyobtained form information in published literature or may be measuredfrom a cross-section of the general population. The two constants arethe insulin clearance rate (k) for a human given a body weight and thedisposition index (DI) for a human given a change in glucoseconcentration.

While there are multiple sources for the information needed to calculatethe insulin clearance rate k, one source is the article “Insulinclearance during hypoglycemia in patients with insulin-dependentdiabetes mellitus”, written by Kollind M et al., published in Horm MetabRes, 1991 July; 23(7):333-5. The insulin clearance rate k is obtainedfrom the insulin infused divided by the steady state plasma insulinconcentration. An insulin clearance constant A_(k), which is independentof an individual's body weight, may be obtained by dividing the insulinclearance rate k (measured from a particular individual) by theindividual's body weight. The insulin clearance constant A_(k) isgenerally the same for all humans, except under extenuatingcircumstances such as after an individual has contracted HIV, othermetabolic affecting diseases, or the like.

The disposition index (DI) for a human given a change in glucoseconcentration is available from information presented in the article“Quantification of the relationship between insulin sensitivity andbeta-cell function in human subjects. Evidence for a hyperbolicfunction”, written by Khan S E et al., published in Diabetes, 1993November; 42(11):1663-72.

Both, the disposition index DI and the insulin clearance rate k may bemeasured directly from tests. The disposition index DI may be calculatedgiven the first phase insulin response measured form a glucose clamptest and the individual's insulin sensitivity measured from an insulinsensitivity test. The insulin clearance rate k may be measured from aninsulin clearance test. The glucose clamp test and the insulin clearancetest are described in the above-mentioned articles and are well known inthe art. The insulin sensitivity S_(I) may be measured using anintravenous glucose tolerance test or a hyperinsulinemic clamp test.

Given these observations, then the following parameters may be measuredfrom an NGT individual's insulin response to a glucose clamp: a desiredfirst phase insulin response φ1, the ratio of K_(D) to K_(p), and theratio of K_(D) to K_(I). Then the derivative gain K_(D) may becalculated from the first phase insulin response φ1 using the constantsk and DI. And finally K_(P) and K_(I) may be calculated using the ratiosof K_(D) to K_(p) and K_(D) to K_(I).

The first phase insulin response φ1 may be observed in a NGT individualas the area under the insulin response curve during approximately thefirst 10 minutes of a glucose clamp. The increase in the glucoseconcentration during the glucose clamp isΔG=(G−G _(B)),

-   -   where G is equal to Gc, the glucose concentration during the        clamp, and G_(B) is the basal glucose concentration before the        clamp.

The importance of the first phase insulin response φ1 has beenemphasized by studies indicating that, in subjects with normal glucosetolerance (NGT), the product of first phase insulin response φ1 andinsulin sensitivity (S_(I)) is a constant known as the dispositionindex, DI=φ1S_(I). Therefore,

${\phi\; 1} = {\frac{D\; I}{S_{I}}.}$

For a different ΔG there is a different φ1 and therefore a different DI.But, the ratio DI/ΔG is substantially constant even for differentindividuals with different insulin sensitivities.

The insulin sensitivity S_(I) is defined as the percentage of theglucose concentration that the body tissues will take up for a givenamount of insulin. The β-cell naturally adapts to changes in insulinsensitivity by adjusting the amount of insulin it secretes during thefirst phase insulin response φ1. This suggests that the body naturallyseeks an optimal level of glucose tolerance. A controller that mimicsthis characteristic of the β-cell more accurately simulates the body'snatural insulin response.

The instantaneous insulin response (RI) may be calculated given theinsulin clearance rate (k) and the first phase insulin response φ1,R_(I)=kφ1.

The insulin clearance rate k is proportional to body weight (W),therefore substituting a proportional constant A_(k) and the user's bodyweight W for k and replacing φ1 with the ratio of DI over S_(I) yieldsthe following equation:

$R_{I} = {A_{k}W{\frac{DI}{S_{I}}.}}$

The instantaneous insulin response R_(I) may also be expressed as theproduct of the derivative gain K_(D) and the change in glucoseconcentration ΔG,R _(I) =K _(D) ΔG.

Setting the two equations for R_(I) equal to each other and solving forK_(D) yields,

$K_{D} = {\frac{W}{S_{I}}\frac{A_{k}{DI}}{\Delta\; G}}$

As mentioned above, DI/ΔG and A_(k) are constants available orcalculated from data in published literature. Combining the constantsinto a single constant, Q,

${Q = \frac{A_{k}{DI}}{\Delta\; G}},$yields an equation for the derivative gain K_(D) that is a function ofthe user's body weight W and the user's insulin sensitivity S_(I),

$K_{D} = {\frac{W}{S_{I}}{Q.}}$

Once the derivative gain K_(D) is calculated, the proportional andintegral gains are calculated using ratios. The ratio of K_(D)/K_(P) canbe set to the dominant time constant for insulin action, ranging from10-60 minutes, but more typically 20-40 minutes and preferably 30minutes. For example, calculating K_(P) given K_(D) using a timeconstant of 30 minutes, yields the following relationship:

$\frac{K_{D}}{K_{P}} = { 30\Rightarrow K_{P}  = {\frac{K_{D}}{30}.}}$

In a similar fashion, the ratio of K_(D)/K_(I) can be set to the averageratio measured from a population of NGT individuals. And K_(I) can becalculated from K_(D).

In particular embodiments, the user enters their body weight W andinsulin sensitivity S_(I) into the device that contains the controller.Then the controller gains are automatically calculated and used by thecontroller. In alternative embodiments, an individual enters the user'sbody weight W and insulin sensitivity S_(I) into a device and the deviceprovides the information to the controller to calculate the gains.

A study was conducted to confirm that the insulin response for anindividual could be reproduced using the glucose sensor as an input. Inthe study, glucose and insulin measurements were taken while ahyperglycemic clamp was applied to a NGT individual. The glucose levelmeasurements, shown in FIG. 29A, were used as the inputs to amathematical model created to simulate a PID insulin responsecontroller. The insulin dosing commanded by the controller in responseto the glucose clamp very closely approximates the actual insulinappearance in the NGT individual, as shown in FIG. 29B. The insulinconcentration measured from periodic blood samples 456 taken from theindividual during the test are represented by dots in FIG. 29B. Theoutput from the mathematical model simulating the insulin responsecommanded by the controller is shown as a solid line 458 in FIG. 29B.

Three different devices were used to measure the individual's bloodglucose during the study. Blood glucose meter readings 460 from periodicblood samples taken from the individual are represented by the dots inFIG. 29A. Two MiniMed sensors (such as those described in the sectionentitled “sensor”, below) were placed in the individual's subcutaneoustissue, and the sensor readings 462, 464 are shown as lines in FIG. 29A.The sensor readings 462, 464 are slightly delayed compared to the meterreadings 460. The delay is most likely due to the delay between bloodglucose and interstitial fluid (ISF) glucose and can be substantiallycorrected through the use of a filter if needed. In this study, thedelay was not corrected by a filter and did not significantly affect thecontroller's ability to command an insulin response that matches thenatural response of the NGT individual. This study indicates that thePID insulin response controller model is a good minimal model of insulinsecretion that captures the biphasic response of healthy β-cells.Correction of the delay is only expected to increase the accuracy of themodel.

Fuzzy Logic to Select Between Multiple Sets of Controller Gains

In preferred embodiments, one set of controller gains is used for aparticular individual. In alternative embodiments, more than one set ofcontroller gains is used, and fuzzy logic is used to select between setsof controller gains and to determine when to change from one set ofcontroller gains to another. In particular alternative embodiments, thecontroller gains are different if the glucose level is above or belowthe desired glucose basal level. In other alternative embodiments, thecontroller gains are different if the glucose level is increasing ordecreasing. A justification for different sets of gains comes fromphysiological studies that indicate that β-cells turn off faster thanthey turn on. In still other alternative embodiments, the controllergains are different depending on whether the glucose level is above orbelow the desired glucose basal level and whether the glucose level isincreasing or decreasing, which results in four sets of controllergains. In additional alternative embodiments, the controller gainschange depending on the magnitude of the hypoglycemic excursion. Inother words, the controller gains for small changes in glucose aredifferent than those for large changes in glucose.

Self-Tuning Controller Gains

Further embodiments may include a controller that self tunes one or morethe gains, K_(P), K_(I), K_(D) to accommodate changes in insulinsensitivity. In particular embodiments, previous measurements of glucoselevels are compared to the desired basal glucose level G_(B). Forexample, the desired basal glucose level G_(B) is subtracted from theprevious glucose level measurements. Then any negative values, within apredefined time window, are summed (in essence integrating the glucoselevel measurements that were below the basal glucose level G_(B)). Ifthe resulting sum is greater than a pre-selected hypoglycemic integralthreshold, then the controller gains are increased by a factor (1+α).Conversely, if the integral of the glucose level measurements that weremeasured above the basal glucose level G_(B) within the predefined timewindow is greater than a pre-selected hyperglycemic integral threshold,then the controller gains are decreased by a factor (1−α).

In particular embodiments, the predefined time window over which theglucose concentration integrals are evaluated is generally 24 hours, andthe controller gains are adjusted if needed at the end of eachpredefined time window. In alternative embodiments, the integrals of theglucose level measurements are continuously calculated over a movingwindow of time, and if either integral exceeds a threshold, the gainsare immediately adjusted. In particular embodiments, the moving timewindow is one hour, and the time window may be restarted whenever thegains are adjusted. In other alternative embodiments, the time window islonger or shorter depending on the sensor accuracy, the rate at which anindividual's insulin sensitivity changes, the computational capabilitiesof the hardware, or the like.

In particular embodiments, the adjustment amount (α) is 0.01. Inalternative embodiments, the adjustment amount α is greater or smallerdepending on the sensor accuracy, the rate at which an individual'sinsulin sensitivity changes, the rate at which the sensor sensitivityS_(I) changes, or the like. In still other alternative embodiments, theadjustment amount α is made larger or smaller depending on the amountthat the integral of the measured glucose levels exceeds a threshold. Inthis way, the gains are adjusted by greater amounts if the measuredglucose level G is significantly deviating from the desired bloodglucose level G_(B) and less if the measured glucose level G is closerto the desired blood glucose level G_(B). In additional alternativeembodiments, the controller employs a Kalman filter.

State Variable Feedback

While the primary signal determining the β-cell's insulin response isglucose, there also exists a putative effect of insulin per se toinhibit insulin secretion. This effect may be directly related to theconcentration of insulin in plasma (IP(t)), or mediated through somesignal proportional to insulin effect (IEFF(t)). The β-cell can likelydirectly sense these signals (i.e., directly sense insulin concentrationand secondary signals proportional to insulin effect such as free fattyacid). Feedback from these intermediary signals is analogous to what isknown as state variable feedback; that is feedback, whereby the variablebeing controlled (glucose in this case) is used together with feedbackof each intermediary signal that affects the variable (insulinconcentration in plasma and interstitial fluid). With this type offeedback, undesirable slow kinetic process can be made to appear muchfaster than they are. For example, if β-cell insulin secretion wereinhibited by a signal proportional to insulin concentration in theinterstitial fluid where it acts, the delay between plasma andinterstitial insulin could be made to appear to be shorter. For theartificial closed-loop algorithm, or for “semi-closed-loop” algorithms,this beneficial effect can be achieved by using “state observers”(mathematical equations that predict the insulin concentration invarious parts of the body knowing the history of past insulin delivery).In “semi-closed loop” algorithms, the algorithms are the same as forclosed loop algorithms but there is a user confirmation step before anyinsulin is actually administered. By using state variable feedback, itis possible to make the insulin in an insulin pump act faster than theinsulin actually is.

To estimate subcutaneous insulin concentration, plasma insulinconcentration, and insulin effect, the following equations may be used:

$\frac{\mathbb{d}I_{SC}}{\mathbb{d}t} = {\alpha_{1}( {I_{D} - I_{SC}} )}$$\frac{\mathbb{d}I_{P}}{\mathbb{d}t} = {\alpha_{2}( {I_{SC} - I_{P}} )}$$\frac{\mathbb{d}I_{EF}}{\mathbb{d}t} = {\alpha_{3}( {I_{P} - I_{EF}} )}$Wherein I_(SC) is the estimate of normalized insulin concentration inthe subcutaneous space, I_(P) is the estimate of normalized insulinconcentration in the plasma, I_(EF) is the estimate of insulin effect onglucose, α₁ is the rate constant between insulin delivery and thesubcutaneous insulin compartment, α₂ is the rate constant betweensubcutaneous insulin and plasma compartments, α₃ is the rate constantbetween the plasma compartment and the insulin effect. I_(D) is thedelivered insulin, which can be a function of the three state variables(I_(SC), I_(P), and I_(EF)).

In particular embodiments, an open loop fixed base rate plus userrequested bolus would result in the bolus being increased a certainamount and the basal rate subsequently decreased the same amount inaccordance to the following formula:I _(D)′=(1+γ₁+γ₂+γ₃)I _(D)−γ₁ I _(SC)−γ₂ I _(P)−γ₃ I _(EF)

Wherein I_(D) is the user requested basal (U/h) plus bolus (U) profileand Id′ is the state feedback adjusted profiles. Note that for a givenkinetic excursion the total amount of insulin requested (area undercurve of ID) and delivered (area under curve of ID′) is identical. Here,γ₁, γ₂, and γ₃ are state-feedback gains (scalars). Careful choice ofthese gains the pump to correct its delivery rate to compensate fordelays associated with the dispersion of insulin from the bolusinjection into the subcutaneous layer of the patient, to the plasma, andto its actual insulin effect/action on the body. Thus, by estimating howmuch insulin from a bolus is in the subcutaneous layer, the plasma, oris actually acting on the patient's glucose level (state variables ISC,IP and IEF), it is possible to optimize delivery of insulin over time tothe patient. Using state feedback the bolus is increased by an amount(1+γ₁+γ₂+γ₃) that is gradually taken away from future insulin delivery(−γ₁I_(SC)−γ₂I_(P)−γ₃I_(EF)). As a result, the apparent insulinpharmokinetic curve appears faster. This is akin to developing a fasteracting insulin, but it is achieved algorithmically by rearranging thedistribution of the insulin delivery per unit bolus by delivering moreupfront and removing the extra amount at a later time. The three gainscan be chosen to move the time delays (1/α₁, 1/α₂, and 1/α₃) to anyarbitrary locations. In control theory, this is known as pole placement.

State feedback can be used in open loop and closed loop insulin deliveryalgorithms and with “semi-closed-loop” delivery algorithms. Statefeedback can be used in conjunction with aProportional-Integral-Derivative (PID) or any other type of closed loopcontroller.

γ₁ is the feedback gain multiplied to I_(SG), γ₂ is the feedback gainmultiplied to I_(P), and γ₃ is the feedback gain multiplied to I_(EF).

The physical state space form directly taken from the equations aboveis:

$\{ {\begin{matrix}{\begin{bmatrix}{\overset{.}{I}}_{SC} \\{\overset{.}{I}}_{P} \\{\overset{.}{I}}_{EF}\end{bmatrix} = {{\begin{bmatrix}{- \alpha_{1}} & 0 & 0 \\\alpha_{2} & {- \alpha_{2}} & 0 \\0 & \alpha_{3} & {- \alpha_{3}}\end{bmatrix} \cdot \begin{bmatrix}I_{SC} \\I_{P} \\I_{EF}\end{bmatrix}} + {\begin{bmatrix}\alpha_{1} \\0 \\0\end{bmatrix} \cdot I_{D}}}} \\{I_{D} = {{\begin{bmatrix}0 & 0 & 0\end{bmatrix} \cdot \begin{bmatrix}I_{SC} \\I_{P} \\I_{EF}\end{bmatrix}} + {\begin{bmatrix}1 \\0 \\0\end{bmatrix} \cdot I_{D}}}}\end{matrix}{or}\mspace{14mu}\{ \begin{matrix}{\overset{.}{x} = {{Ax} + {Bu}}} \\{y = {{Cx} + {du}}}\end{matrix} } $

The finite difference form is calculated as follows (wherein e^(x)indicates an exponential function):

Define: k₁=e^(−α) ¹ ^(T), k₂=e^(−α) ² ^(T), k₃=e^(−α) ¹ ^(T)I _(SC)(i)=(1−k ₁)(I _(D)(i−1))+k ₁ I _(SC)(i−1)  (eq 1b)I _(P)(i)=(1−k ₂)(I _(SC)(i))+k ₂ I _(P)(i−1)  (eq 2b)I _(EF)(i)=(1−k ₃)(I _(P)(i))+k ₃ I _(EF)(i−1)  (eq 3b)

The Laplace Form is as follows, wherein s represents the Stäckeldeterminant used in Laplace equations:

$\begin{matrix}{\frac{I_{SC}}{I_{D}} = \frac{\alpha_{1}}{s + \alpha_{1}}} & ( {{eq}\mspace{14mu} 1c} ) \\{{\frac{I_{P}}{I_{SC}} = \frac{\alpha_{2}}{s + \alpha_{2}}},} & ( {{eq}\mspace{14mu} 2c} ) \\{{\frac{I_{EFF}}{I_{P}} = \frac{\alpha_{3}}{s + \alpha_{3}}},} & ( {{eq}\mspace{14mu} 3c} ) \\{{\frac{I_{P}}{I_{D}} = \frac{\alpha_{1}\alpha_{2}}{( {s + \alpha_{1}} )( {s + \alpha_{2}} )}},} & ( {{eq}\mspace{14mu} 4} ) \\{\frac{I_{EFF}}{I_{D}} = {\frac{\alpha_{1}\alpha_{2}\alpha_{3}}{( {s + \alpha_{1}} )( {s + \alpha_{2}} )( {s + \alpha_{3}} )}.}} & ( {{eq}\mspace{14mu} 5} )\end{matrix}$

To obtain the transfer function of insulin delivery with state feedback,the control equation is as follows, wherein E represents the errorbetween the actual glucose concentration and the desired glucoseconcentration (G−G_(D)):I _(D) =PID·E−γ ₁ I _(SC)−γ₂ I _(P)−γ₃ I _(EFF)  (eq 6)Substituting equations (eq 1c), (eq 4) and (eq 5) into (eq 6) andrearranging, the following transfer functions are obtained, wherein GMis a gain multiplier:

$\begin{matrix}{\frac{I_{D}}{E} = \frac{({GM})({PID})( {s + \alpha_{1}} )( {s + \alpha_{2}} )( {s + \alpha_{3}} )}{\begin{matrix}{{( {s + \alpha_{1}} )( {s + \alpha_{2}} )( {s + \alpha_{3}} )} +} \\{{\alpha_{1}{\gamma_{1}( {s + \alpha_{2}} )}( {s + \alpha_{3}} )} +} \\{{\alpha_{1}\alpha_{2}{\gamma_{2}( {s + \alpha_{3}} )}} + {\alpha_{1}\alpha_{2}\alpha_{3}\gamma_{3}}}\end{matrix}}} & ( {{eq}\mspace{14mu} 7} ) \\{\frac{I_{SC}}{E} = \frac{({GM})({PID}){\alpha_{1}( {s + \alpha_{2}} )}( {s + \alpha_{3}} )}{\begin{matrix}{{( {s + \alpha_{1}} )( {s + \alpha_{2}} )( {s + \alpha_{3}} )} +} \\{{\alpha_{1}{\gamma_{1}( {s + \alpha_{2}} )}( {s + \alpha_{3}} )} +} \\{{\alpha_{1}\alpha_{2}{\gamma_{2}( {s + \alpha_{3}} )}} + {\alpha_{1}\alpha_{2}\alpha_{3}\gamma_{3}}}\end{matrix}}} & ( {{eq}\mspace{14mu} 8} ) \\{\frac{I_{P}}{E} = \frac{({GM})({PID})\alpha_{1}{\alpha_{2}( {s + \alpha_{3}} )}}{\begin{matrix}{{( {s + \alpha_{1}} )( {s + \alpha_{2}} )( {s + \alpha_{3}} )} +} \\{{\alpha_{1}{\gamma_{1}( {s + \alpha_{2}} )}( {s + \alpha_{3}} )} +} \\{{\alpha_{1}\alpha_{2}{\gamma_{2}( {s + \alpha_{3}} )}} + {\alpha_{1}\alpha_{2}\alpha_{3}\gamma_{3}}}\end{matrix}}} & ( {{eq}\mspace{14mu} 9} ) \\{\frac{I_{EFF}}{E} = \frac{({GM})({PID})\alpha_{1}\alpha_{2}\alpha_{3}}{\begin{matrix}{{( {s + \alpha_{1}} )( {s + \alpha_{2}} )( {s + \alpha_{3}} )} +} \\{{\alpha_{1}{\gamma_{1}( {s + \alpha_{2}} )}( {s + \alpha_{3}} )} +} \\{{\alpha_{1}\alpha_{2}{\gamma_{2}( {s + \alpha_{3}} )}} + {\alpha_{1}\alpha_{2}\alpha_{3}\gamma_{3}}}\end{matrix}}} & ( {{eq}\mspace{14mu} 10} )\end{matrix}$

The computation of the gain multiplier is also obtained in the statevariable feedback method. When state variable feedback is used, the gainmultiplier (GM) is a scalar that forces a step response to reach thesame steady value whether state feedback is used or not. In other words,GM ensures that the total amount given per unit of bolus will be thesame in both cases. In the case of state feedback, more insulin is givenup front, but this extra insulin is taken away later. To calculate GM inparticular embodiments, the “final value theorem” from control systemsis used. The final value theorem states that to evaluate the steadystate of any transfer function T(s) given any input X(s), the steadystate output response to the input is given by:

${y_{SS}( tarrow\infty )} = {\lim\limits_{sarrow 0}( {{{sT}(s)}{X(s)}} )}$

The Laplace form of a step input is given by

${X(s)} = \frac{1}{s}$and the steady state solution of the final value theorem simplifies to:

${y_{SS}( tarrow\infty )} = {\lim\limits_{sarrow 0}{( {T(s)} ).}}$In the case when there is no state feedback, (γ₁, γ₂ and γ₃=0), thesteady state solution may be obtained from equation (eq 7) to be asfollows:I _(D)(t→∞)=1  (eq 11).With state feedback without the gain correction factor, the steady statesolution is:

$\begin{matrix}{{I_{D}( tarrow\infty )} = {\frac{1}{1 + \gamma_{1} + \gamma_{2} + \gamma_{3}}.}} & ( {{eq}\mspace{14mu} 12} )\end{matrix}$GM is then evaluated as the ratio of equation (eq 12) to equation (eq11) to obtain the following:GM=1+γ₁+γ₂+γ₃.

Using state variable feedback, a closed loop control equation and statefeedback gain are determined for pole placement. Specifically, the gainsare calculated for the insulin delivery equation shown above. Inparticular embodiments, they are determined as follows: First, withstate feedback, the denominator of equations (eq 7), (eq 8), (eq 9), and(eq 10) is:D=s ³+(α₁+α₂+α₃+γ₁α₁)s²+(α₁α₂+(α₁+α₂)α₃+γ₂α₁α₂+(α₂+α₃)γ₁α₁)s+(α₁α₂α₃+γ₃α₁α₂α₃+γ₂α₁α₂α₃+γ₁α₁α₂α₃)  (eq14)To get the poles of the system in the equations (eq 7), (eq 8), (eq 9),or (eq 10), D may be set equal to zero yield the characteristicequation:s ³+(α₁+α₂+α₃+γ₁α₁)s²+(α₁α₂+(α₁+α₂)α₃+γ₂α₁α₂+(α₂+α₃)γ₁α₁)s+(α₁α₂α₃+γ₃α₁α₂α₃+γ₂α₁α₂α₃+γ₁α₁α₂α₃)=0  (eq16)If the desired system poles or roots of (eq 16) are defined byeigenvalues λ₁, λ₂ and λ₃, then the characteristic equation can bewritten as:(s−λ ₁)(s−λ ₂)(s−λ ₃)=0.Expanding and collecting like powers of s, (eq 16) can be written as:s ³−(λ₁+λ₂+λ₃)s ²+(λ₁λ₂+λ₁λ₃+λ₂λ₃)s−λ ₁λ₂λ₃=0  (eq 17)Setting the coefficients of like powers of s equal to each other we havethe system of equations:α₁+α₂+α₃+γ₁α₁=−(λ₁+λ₂+λ₃)  (eq 18)α₁α₂+α₁α₃+α₂α₃+γ₂α₁α₂+γ₁α₁(α₂+α₃)=λ₁λ₂+λ₁λ₃+λ₂λ₃  (eq 19)α₁α₂α₃+γ₃α₁α₂α₃+γ₂α₁α₂α₃+γ₁α₁α₂α₃=−λ₁λ₂λ₃  (eq 20)This results in three equations and three unknowns, γ₁, γ₂ and γ₃.Therefore, the unknown gains can be solved for in terms of the desiredpoles λ₁, λ₂, λ₃, and system time constants, α₁, α₂ and α₃. Theseformulas enable us to control the desired pharmacokinetics of insulin asit appears in the different compartments:

$\gamma_{1} = \frac{- ( {\lambda_{1} + \lambda_{2} + \lambda_{3} + \alpha_{1} + \alpha_{2} + \alpha_{3}} )}{\alpha_{1}}$$\gamma_{2} = \frac{\begin{matrix}{{\lambda_{1}\lambda_{2}} + {\lambda_{1}\lambda_{3}} + {\lambda_{2}\lambda_{3}} - {\alpha_{1}\alpha_{2}} -} \\{{\alpha_{1}\alpha_{3}} - {\alpha_{2}\alpha_{3}} + {( {\lambda_{1} + \lambda_{2} + \lambda_{3} + \alpha_{1} + \alpha_{2} + \alpha_{3}} )( {\alpha_{2} + \alpha_{3}} )}}\end{matrix}}{\alpha_{1}\alpha_{2}}$$\gamma_{3} = {\frac{{- \lambda_{1}}\lambda_{2}\lambda_{3}}{\alpha_{1}\alpha_{2}\alpha_{3}} - ( \frac{\begin{matrix}{{\lambda_{1}\lambda_{2}} + {\lambda_{1}\lambda_{3}} + {\lambda_{2}\lambda_{3}} - {\alpha_{1}\alpha_{2}} - {\alpha_{1}\alpha_{3}} -} \\{{\alpha_{2}\alpha_{3}} + {( {\lambda_{1} + \lambda_{2} + \lambda_{3} + \alpha_{1} + \alpha_{2} + \alpha_{3}} )( {\alpha_{2} + \alpha_{3}} )}}\end{matrix}}{\alpha_{1}\alpha_{2}} ) + \frac{( {\lambda_{1} + \lambda_{2} + \lambda_{3} + \alpha_{1} + \alpha_{2} + \alpha_{3}} )}{\alpha_{1}} - 1}$

Thus, through the above calculations, the gains can be calculated andused in the control equation for insulin delivery of:I _(D) =PID·E−γ ₁ I _(SC)−γ₂ I _(P)−γ₃ I _(EFF)PID is the output of a PID controller of any other closed loop (or“semi-closed-loop”) controller. The gains are generally calculated justonce, but could be calculated more often if desired. The controlequation may be calculated on a repeated basis, after predeterminedperiods of time or continuously. For example, and without limitation, itmay be calculated every five, ten, thirty or sixty minutes. Just thestate variable portion (γ₁I_(SC)−γ₂I_(P)−γ₃I_(EF)) may be updated or theentire equation may be updated. By updating the control equation, it ispossible to continually improve the delivery of insulin to the patient.

A control feedback block diagram of an embodiment of a pump using statevariable feedback is shown in FIG. 42. As shown, the desired glucoseG_(D) 600 of the patient is entered into the PID Controller 610. Theoutput of the PID controller is an insulin delivery value I_(D) 601. Theblock then calculates how much insulin should actually be delivered tothe patient as a bolus in addition to the insulin delivery value and howmuch should be taken away from the basal rate, as discussed above. Ateach discrete time interval, Ti, (T1 620, T2 630, and T3 640), theamount of insulin that has entered into the subcutaneous layer from thepump is calculated to provide I_(SC) 602. That value will be multiplied(or otherwise factored by) γ₁ 605 and subtracted from the output of thePID controller to provide an improved desired insulin value based on thesubcutaneous insulin concentration (with the other calculationsfollowing). At each discrete time interval Ti, the amount of insulinthat has entered into the plasma from the subcutaneous compartment iscalculated to provide I_(P) 603. That value will be multiplied (orotherwise factored by) γ₂ 606 and subtracted from the output of the PIDcontroller to determine an improved desired insulin value based on theplasma insulin concentration. At each discrete time interval Ti, theamount of insulin actually going into action or the effective insulincompartment from the insulin in the plasma is calculated to provideI_(EF) 604. That value will be multiplied (or otherwise factored by) γ₃607 and subtracted from the output of the PID controller to determine animproved desired insulin value based on the effective insulin. Theinsulin actually delivered to the subject 650 will then change the bloodglucose G of the user 608, which will then be measured by the sensor 660and compared to the desired glucose 600.

FIGS. 43-46 show graphs with the effect of state feedback. FIG. 43 showsthe effect on the basal insulin delivery rate achieved using thealgorithm described above. A bolus is given at time zero. Line 700 showsthe insulin delivery when no state feedback is used. This line would bethe same as a regular delivery of an insulin bolus and is indicated as0.0000, because it does not change the amount of basal rate beingdelivered. The other three lines illustrate the change in insulindelivery rate over time when all of the state feedback is placed in oneof the gains γ₁, γ₂, or γ₃. As can be seen, if all the state feedback isplaced in the gain γ₁ (for the subcutaneous layer), the basal insulindelivery rate 701 (in relation to the standard basal rate) starts outlow and gradually moves to a limit of zero, or the rate without statefeedback, as steady state is reached. If all of the state feedback isplaced in the gain γ₂ (for the plasma layer), the basal insulin deliveryrate 702 starts at zero, dips lower, and then gradually returns up to alimit of zero as steady state is reached. If all of the state feedbackis placed in the gain γ₃ (for the insulin action/effect), the basalinsulin delivery rate 703 starts at zero, dips lower, but more slowlythan for the all γ₂ delivery rate, and then gradually returns up to alimit of zero as steady state is reached. In all cases, the totaldelivery of insulin is the same.

FIG. 44 shows the effect of state feedback per unit bolus on thesubcutaneous insulin. In other words, a bolus of insulin is given to apatient at time zero and the figure shows the rate in which the amountof insulin in the subcutaneous layer, from that bolus, decreases tozero. Line 705 shows the amount of insulin in the subcutaneous layerover time with no state feedback. Line 706 shows the amount of insulinin the subcutaneous layer over time when all of the state feedback isplaced in gain γ₁. Line 707 shows the amount of insulin in thesubcutaneous layer over time when all of the state feedback is placed ingain γ₂. Line 708 shows the amount of insulin in the subcutaneous layerover time when all of the state feedback is placed in gain γ₃.

FIG. 45 shows the effect of state feedback per unit bolus on the plasmainsulin. In other words, a bolus of insulin is given to a patient attime zero and the figure shows the rate in which the amount of insulinin the plasma layer, from that bolus, increases from zero (there is aslight delay from injecting insulin to when the insulin moves into theplasma from the subcutaneous layer), reaches its peak and then returnsto zero. Line 710 shows the amount of insulin in the plasma over timewith no state feedback. Line 711 shows the amount of insulin in theplasma over time when all of the state feedback is placed in gain γ₁.Line 712 shows the amount of insulin in the plasma over time when all ofthe state feedback is placed in gain γ₂. Line 713 shows the amount ofinsulin in the plasma over time when all of the state feedback is placedin gain γ₃.

FIG. 46 shows the effect of state feedback per unit bolus on the insulineffect. In other words, a bolus of insulin is given to a patient at timezero and the figure shows the rate in which the amount of insulin fromthat bolus creates the insulin effect on the body, starting at zero(there is a delay from the injection of insulin into the subcutaneouslayer and through the plasma to the insulin effect), rising to itsmaximum point, and decreasing to zero. Line 715 shows the insulin effectover time with no state feedback. Line 716 shows the insulin effect overtime when all of the state feedback is placed in gain γ₁. Line 717 showsthe insulin effect over time when all of the state feedback is placed ingain γ₂. Line 718 shows the insulin effect over time when all of thestate feedback is placed in gain γ₃.

FIGS. 47 and 48 compare insulin state variable feedback used inconjunction with a PID closed loop controller as opposed to use of a PIDclosed loop controller alone (with no insulin state variable feedback).FIG. 47 shows the simulated glucose concentration of a patient overtime. Meals are given at 8, 13, 18, 22, and 32 hours. The glucoseconcentration using the PID with insulin state feedback is shown as line800. The glucose concentration using the PID without insulin statefeedback is shown as line 801. With glucose concentrations, it is alwayspreferable to keep a patient's concentrations from being too high or toolow, so the more that the closed loop program can avoid high and lowvalues, the better. As can be seen in FIG. 47, as time goes on, theglucose concentration using the PID with insulin state feedback improvesover time (versus the glucose concentration using the PID withoutinsulin state feedback) in that it varies less as time goes on, keepingthe patient with a more steady glucose level that will greatly reducehyper- and hypoglycemic events. FIG. 48 shows average simulated insulindelivery profiles from the same system as FIG. 47. Line 810 representsthe insulin delivery using the PID with insulin state feedback. Line 811represents the insulin delivery using the PID without insulin statefeedback. As can be seen, the insulin delivery using the PID withinsulin state feedback contains more spikes and dips, resulting from thestate feedback.

Modifying the PID Controller to Incorporate an Integrator Leak

In preferred embodiments, the PID control response was described withconstant gain components, K_(P), K_(I), K_(D). Although the preferredcontrol response guarantees zero steady-state error (i.e. steady stateglucose minus a desired basal glucose (G_(B))=0), inherently, theintegral component,

U_(I) = K_(I)∫_(t_(o))^(t)(G − G_(B))𝕕t + U_(I)(t₀),destabilizes feedback control because there is no temporal wind down ofthe insulin response while the integral component models the increase inthe insulin response. Without any correction, the integral component hasa tendency to over-estimate the increase in the insulin response. Sincea small difference between steady-state glucose and G_(B) is typicallyacceptable in insulin response control, an alternative modeling of theintegral component can incorporate an integrator leak to reduce themagnitude of the destabilizing effect. Specifically, changes in U_(I)(t)can be described by a term proportional to the error in glucose and aterm that leaks in proportion to the magnitude of U_(I). This can beexpressed in the formula:

${\frac{\mathbb{d}U_{I}}{\mathbb{d}t} = {{K_{I}( {G - G_{B}} )} - {K_{LEAK}U_{I}}}};$with initial condition U_(I)(t₀)The parameter K_(LEAK) is the reciprocal time constant of the rate ofleaking (τ_(LEAK) in min=1/K_(LEAK)), where τ_(LEAK) is a tuningparameter that can be set based on empirical data, and be tied with theother gain components K_(P), K_(I), K_(D). However, the currentrealization of the artificial β-cell has τ_(LEAK) as a user input. U_(I)can also be expressed in discrete form by standard methods.

Post-Controller (Lead/Lag) Compensator

In preferred embodiments, commands are issued from the controllerwithout regard to where in the body the insulin delivery system willinfuse the insulin. In essence, the assumption is that the insulin iseither delivered directly into the blood stream for immediate use by thebody, or that any time delays caused by delivering the insulin somewherein the body other than the blood stream can be compensated for byadjusting K_(P), K_(I), and K_(D). In this case, the commands generallymodel a β-cell insulin secretion profile, an example of which is shownin FIG. 35A. And since the β-cells secrete insulin directly into theblood stream, the β-cell insulin secretion profile is the intended bloodplasma insulin concentration profile. However, an insulin delivery delaymay distort the intended blood plasma insulin concentration profile, asshown in FIG. 35B. The insulin delivery delay is the amount of timebetween the instant that the command is given to the insulin deliverysystem to infuse insulin and the time that insulin reaches the bloodplasma. An insulin delivery delay may be caused by a diffusion delay,represented by a circle with an arrow 528 in FIG. 20, which is the timerequired for insulin that has been infused into a tissue to diffuse intothe blood stream. Other contributors to insulin delivery delay mayinclude, time for the delivery system to deliver the insulin to the bodyafter receiving a command to infuse insulin, time for the insulin tospread through out the circulatory system once it has entered the bloodstream, and/or by other mechanical or physiological causes. In addition,the body clears insulin even while an insulin dose is being deliveredfrom the insulin delivery system into the body. Since insulin iscontinuously cleared from the blood plasma by the body, an insulin dosethat is delivered to the blood plasma too slowly or is delayed is atleast partially, if not significantly, cleared before the entire insulindose fully reaches the blood plasma. And therefore, the insulinconcentration profile in the blood plasma never achieves the same peak(nor follows the same profile) it would have achieved if there were nodelay. Given an insulin dose delivered all at once into the blood plasmaat time zero, the insulin concentration in the blood plasma is raisedvirtually instantaneously (not shown) and then would decreaseexponentially over time as the body clears (uses or filters out) theinsulin, as shown in FIG. 36A per equation:

$C_{P} = {\frac{I_{0}}{V_{p}}{\mathbb{e}}^{{- P_{1}}t}}$

Where C_(P) is the concentration of insulin in the blood plasma,

-   -   I₀ is a mass of the insulin dose delivered directly to the blood        plasma at time zero,    -   V_(p) is a volume of the blood plasma in the body,    -   P₁ is a reciprocal time constant for insulin clearance, and    -   t is the time that has passed since the delivery of the insulin        dose directly into the blood plasma.        The time constant for insulin clearance P₁ may be calculated        using the following equation:

$P_{1} = {- \frac{k}{V_{P}}}$

Where k is the volume insulin clearance rate, and

-   -   V_(p) is a volume of the blood plasma in the body.        Or the time constant for insulin clearance P₁ may be obtained by        providing insulin to an individual that does not generate his        own insulin, and then periodically testing blood samples from        the individual for insulin concentration. Then, using an        exponential curve fitting routine, generate a mathematical        expression for a best-fit curve for the insulin concentration        measurements, and observe the time constant in the mathematical        expression.

Given the same insulin dose (delivered at time zero all at once) intothe subcutaneous tissue, instead of directly into the blood plasma, theconcentration of insulin in the blood plasma would begin to rise slowlyas insulin diffuses from the interstitial fluid ISF into the bloodplasma, as shown in FIG. 36B. At the same time that insulin is enteringthe blood plasma, the body is clearing insulin from the blood. While therate at which insulin is entering the blood plasma exceeds the insulinclearance rate, the insulin concentration in the blood plasma continuesto increase. When the insulin clearance rate exceeds the rate at whichinsulin is entering the blood plasma from the interstitial fluid ISF,the insulin concentration in the blood plasma begins to decrease. So,the result of delivering insulin into the interstitial fluid ISF insteadof directly into the blood stream is that the insulin concentration inthe blood plasma is spread over time rather than increased virtuallyinstantaneously to a peak followed by a decay.

A bi-exponential equation may be used to model the insulin concentrationin blood plasma given an insulin dose delivered to the subcutaneoustissue:

$C_{P} = {\frac{I_{0}D}{V_{p}{V_{ISF}( {P_{3} - P_{2}} )}}( {{\mathbb{e}}^{{- P_{2}}t} - {\mathbb{e}}^{{- P_{3}}t}} )}$

Where C_(P) is the concentration of insulin in the blood plasma,

-   -   I₀ is the mass of the insulin dose delivered to the subcutaneous        tissue at time zero,    -   D is a diffusion coefficient (the rate at which insulin diffuses        from the interstitial fluid ISF into the blood glucose)    -   V_(p) is a volume of the blood plasma in the body,    -   V_(SIF) is a volume of interstitial fluid ISF that the insulin        is delivered to,    -   P₂ is a time constant    -   P₃ is a time constant greater than or equal to P₂, and    -   t is time since the delivery of the insulin dose into the        interstitial fluid ISF.        The time constants may be calculated using the quadratic        formula:

$P_{2},{P_{3} = {- \frac{a_{1} \pm \sqrt{a_{1}^{2} - {4a_{0}}}}{2}}}$Where ${a_{1} = {\frac{D + K}{V_{P}} + \frac{D}{V_{ISF}}}},{and}$$a_{0} = {{( \frac{D + K}{V_{P}} )( \frac{D}{V_{ISF}} )} - {\frac{D^{2}}{V_{ISF}V_{P}}.}}$

In alternative embodiments, a post-controller lead-lag compensator 522is used to modify the commands (U_(PID)) to compensate for the insulindelivery delay and/or the insulin clearance rate k, as shown in FIG. 37.The post-controller lead-lag compensator 522 is of the form

$\frac{U_{COMP}}{U_{PID}} = \frac{s + \alpha}{s + \gamma}$

where 1/α and 1/γ are the lead and lag constants respectively, s is theLaplace variable, and U_(COMP) is the compensated commands calculated bythe lead-lag compensator 522.

The PID controller generates commands (U_(PID)) for a desired insulindelivery rate into the blood plasma. The commands U_(PID) are calculatedand issued periodically depending on the update rate for the controlloop, which is selected based on a maximum anticipated rate of change ofthe blood glucose level, an insulin delivery system minimum insulindosage, insulin sensitivity, a maximum and a minimum acceptable glucoseconcentration, or the like. The commands U_(PID) are used as inputs tothe post-controller lead-lag compensator 522.

In particular embodiments, the compensated commands (U_(comp)) issuedfrom the post-controller lead-lag compensator 522 uses more than onevalue from the controller. In particular embodiments, post-controllerlead-lag compensator 522 uses the present command (U_(PID) ^(n)) and theprevious command (U_(PID) ^(n−1)) to calculate a compensated commandU_(comp) per a compensation equation:U _(COMP) ^(n)=(1−γ)U _(COMP) ^(n−1) +U _(PID) ^(n)+(1−α)U _(PID) ^(n−1)

Where U_(PID) ^(n) is the present command

U_(PID) ^(n−1) is the previous command,

U_(COMP) ^(n−1) is the previous compensated control output,

α is the reciprocal lead time constant in min⁻¹, and

γ is the reciprocal lag time constant in min⁻¹.

This is a first forward difference equation. However, other forms can beused alternatively (e.g. first backward or bilinear), but all result ina compensated control output (U_(COMP)) that is comprised of a weightedhistory of both past PID outputs (U_(PID)), and past compensated outputs(U_(COMP)).

An alternative method of modifying the commands (U_(PID)) to compensatefor the insulin delivery delay and/or the insulin clearance can beperformed based on a weighted history of past insulin delivery. Bygiving the most recent delivery history more weight, the weightedhistory of the previous insulin delivered can then be subtracted fromthe present PID control output to yield a compensated control output.Expressed in Laplace domain this results in:

$U_{COMP} = {{PIDE} - {\frac{\lambda}{s + \alpha}U_{COMP}}}$

Where E is the Laplace transformed error signal (G−G_(B)), λ determineshow much the PID output is reduce in proportion to the weighted historyof past control outputs, and α is the reciprocal time constantdetermining how long a history is weighted (the preferred value of αwould be equal to the reciprocal dominant time constant or subcutaneousinsulin appearance, P₂). Solving the compensated signals as a functionof the error results in:

$\frac{U(s)}{E(s)} = {{{PID}\frac{s + \alpha_{w}}{s + ( {\alpha + \lambda} )}} = {{PID}\frac{s + \alpha_{w}}{s + \gamma}}}$which is identical to the previously described lead-lag compensation.

In other alternative embodiments, additional previous command values maybe used. In still other alternative embodiments, the compensationequation compensates for both time constants P₂ and P₃.

In still more alternative embodiments, the controller gains are modifiedto include the effects of the post-controller lead/lag compensator sothat the post-controller lead/lag compensator is not needed to modifythe commands to account for the insulin delivery delay.

In particular embodiments, the insulin delivery system provides finiteinsulin doses into the body in response to commands from the controller.The smallest amount of insulin that the insulin delivery system candeliver is the minimum finite insulin dose. The controller may generatecommands for a dose of insulin to be delivered that is not a wholenumber multiple of the minimum finite insulin dose. Therefore, eithertoo much or too little insulin is delivered by the insulin deliverysystem in response to the commands. In particular alternativeembodiments, the post-controller lead-lag compensator truncates thecommand to the nearest whole number multiple of the minimum finiteinsulin dose and adds the remaining commanded volume of insulin to thenext command. In other alternative embodiments, a compensator rounds thecommand to the nearest whole number multiple of the minimum finiteinsulin dose. In still other alternative embodiments, other methods areused to compensate for the difference between the commands and thenearest whole number multiple of the minimum finite insulin dose. Inother embodiments, no compensation is needed.

Eliminating the Lead-Lag Compensator with Feedback of Predicted PlasmaInsulin

Yet in another alternative embodiment, the PID control commands may bemodified to emulate the effect of plasma insulin on a β-cell todetermine optimal insulin administration by feeding back a predictedplasma insulin based on the subcutaneous insulin infusion. The neteffect of such feedback is to replace an undesired dynamic with a moredesirable one and achieve a plasma insulin profile that a β-cell wouldachieve. This can be seen as follows (using Laplace transformedvariables). Assume the relation between glucose above basal (G−G_(B))and insulin delivery (ID) is described by a linear transfer functionID(s)=C(s)(G(s)−G _(B))where, C(s) may be, but is not necessarily, described by the PIDcontroller transfer function. If the β-cell is using peripheral insulin(I_(p)(s)) levels to suppress insulin secretion the predicted rate ofinsulin delivery would be modified as:ID(s)=C(s)(G(s)−G _(B))−kI _(p)(s)For portal insulin delivery the relation between ID(s) and plasmainsulin I_(p)(s) is known to be approximated by a single time delay:

${I_{p}(s)} = {\frac{k_{1}}{s + \alpha}{{ID}(s)}}$Substituting I_(p)(s) value into the previous formula and making k largeresults in:

$\begin{matrix}{{{ID}(s)} = \frac{{C(s)}( {{G(s)} - G_{B}} )}{1 + \frac{{kk}_{1}}{s + \alpha}}} \\{{\approx {{C(s)}\frac{s + \alpha}{{kk}_{1}}( {{G(s)} - G_{B}} )}};}\end{matrix}$ $1{\operatorname{<<}\frac{{kk}_{1}}{s + \alpha}}$Which would completely cancel the undesirable time constant 1/α. Inpractice a lower value of k would be used resulting in:

$\begin{matrix}{{{ID}(s)} = {{{C(s)}( {{G(s)} - G_{B}} )} - {\frac{{kk}_{1}}{s + \alpha}{{ID}(s)}}}} \\{= {{C(s)}\frac{s + \alpha}{s + \gamma}( {{G(s)} - G_{B}} )}}\end{matrix}$where γ=α+kk₁ (i.e. something greater than α). Thus, the effect for theβ-cell, of adding a plasma insulin feedback is to replace the portalinsulin delivery time constant (α) with a faster time constant (γ=α+kk₁;γ>α). In block diagram form:

To apply this mechanism to subcutaneous insulin delivery all that isneeded is the transfer function between sc insulin delivery and plasmainsulin. This transfer function is well approximated by a bi-exponentialtime course (bolus response) or:

$\frac{I_{p}(s)}{{IDsc}(s)} = \frac{k_{2}}{( {s + \alpha_{1}} )( {s + \alpha_{2}} )}$${thus},\begin{matrix}{{{ID}(s)} = {{{C(s)}( {{G(s)} - G_{B}} )} - {\frac{{kk}_{2}}{( {s + \alpha_{1}} )( {s + \alpha_{2}} )}{{ID}(s)}}}} \\{= {{C(s)}\frac{1}{1 + \frac{{kk}_{2}}{( {s + \alpha} )( {s + \alpha_{2}} )}}( {{G(s)} - G_{B}} )}}\end{matrix}$in the limiting case as kk₂/(s+α₁)(s+α₂)>>1 this is approximately equal

${{ID}(s)} = {{C(s)}\frac{( {s + \alpha_{1}} )( {s + \alpha_{2}} )}{{kk}_{2}}( {{G(s)} - G_{B}} )}$where again, the undesirable time constants associated with subcutaneousinsulin delivery have been eliminated. In practice they would just bereplaced with more desirable rate constants (i.e. faster timeconstants).

Correction of Hypoglycemic Excursion Around ˜200 Minutes (Wind-Down)

Previous modeling of β-cells using a PID controller gave excellentpredictability of the “first” and “second” phase insulin responsesduring prolonged periods of increased glucose appearance. However, ifthe periods of increased glucose appearance is followed by a rapiddecrease in glucose appearance, the PID controller would not be able tocorrectly predict the wind down of the insulin response to lower glucoselevels. FIG. 41B illustrates the insulin response to the blood glucoselevel of FIG. 41A based on the clinical data (shown as data points), thePID modeling (shown as a solid line), and correction of the PID for thehypoglycemic excursion (shown as a dashed line).

In preferred embodiments, the hypoglycemic excursion is corrected bymodifying the PID controller to a PD control with Adaptive ProportionalGain (or Bilinear PID controller), which is modified form of theoriginal PID equations. As described previously, the discrete PIDalgorithm is as follows:Proportional Component Response: P _(con) ^(n) =K _(P)(SG _(f) ^(n) −G_(sp)),Integral Component Response: I _(con) ^(n) =I _(con) ^(n−1) +K _(I)(SG_(f) ^(n) −G _(sp)); I _(con) ⁰ =I _(b), andDerivative Component Response: D _(con) ^(n) =K _(D) dGdt _(f) ^(n),Where K_(P), K_(I), and K_(D) are the proportional, integral, andderivative gain coefficients, SG_(f) and dGdt_(f) are the filteredsensor glucose and derivative respectively, and the superscript n refersto discrete time.

In the Bilinear PID controller, the proportional gain K_(P) is based onthe integrated error term. The magnitude of each component'scontribution to the insulin response is described by the followingequations:P _(con) ^(n) =K _(p) ^(n)(SG _(f) ^(n) −INT)D _(con) ^(n) =K _(D) dGdt _(f) ^(n)K _(p) ^(n) =K _(p) ^(n−1) +K _(I)(SG _(f) ^(n) −G _(sp)), where K _(p)⁰ =K _(P0)Where the proportional gain now integrates at rate K_(I) (initial valueK_(P0)) and the proportional component is related to an intercept value(INT) where (INT<G_(sp)). The modified formulation can be seen to fitthe hypoglycemic glucose excursion without systematic error as theadaptive PD line shown as a dashed line in FIG. 39.

In additional embodiments, the Bilinear PID controller can alsoincorporate an integrator leak by modifying the formula to multiply theprevious K_(P) with a value such as a as follows:K _(p) ^(n) =αK _(P) ^(n−1) +K _(I)(SG _(f) ^(n) −G _(sp)), where α≈0.99

An alternative method of correcting the hypoglycemic glucose excursioncan be performed by integrator clip into the PID control. PIDcontrollers generally have integrator-reset rules that prevent excessive“winding” and such a rule can be used to correct the hypoglycemicglucose excursion. For example, the integrator can be clipped asfollows:If (SG≦60 mg/dl AND I _(con) ^(n−1) >K _(P)(SP−60)) then I _(con) ^(n−1)=K _(P)(SP−60)This equation resets the integrator such that if the sensor glucosefalls below 60 mg/dl the insulin delivery is zero for all stable orfalling sensor glucose signals. The clipping limit represents anabsolute threshold, similar to the human counter regulatory response.

However, other approaches that may emulate the β-cell more accuratelyinclude the use of piecewise continuous functions. For example, thefollowing function allows for progressive clipping to be tuned:

${\gamma({SG})} = {\gamma_{0} + {( {1 - \gamma_{0}} )\lbrack \frac{T_{1} - {SG}}{T_{1} - 60} \rbrack}}$if (SG≦T ₁ mg/dl AND I _(con) ^(n−1) >γK _(P)(SP−60)) then I _(con)^(n−1) =γK _(P)(SP−60)

This equation introduces two additional tuning parameters (γ₀ and T₁)and starts to check the integrator output at a higher threshold. Forexample, if γ₀=5 and T₁=100 mg/dl, the integrator output would beclipped to 4K_(P)60 if glucose fell to 90 mg/dl, 3K_(P)60 if glucosefell to 80 mg/dl and so forth until glucose reached 60 where it would beclipped at K_(P)60. Other functions than that proposed in the aboveequation (e.g. functions based on the rate of fall of glucose, orpercent decrease in I_(con)) may alternatively be used.System Configurations

The following sections provide exemplary, but not limiting,illustrations of components that can be utilized with the controllerdescribed above. Various changes in components, layout of variouscomponents, combinations of elements, or the like may be made withoutdeparting from the scope of the embodiments of the invention.

Before it is provided as an input to the controller 12, the sensorsignal 16 is generally subjected to signal conditioning such aspre-filtering, filtering, calibrating, or the like. Components such as apre-filter, one or more filters, a calibrator and the controller 12 maybe split up or physically located together, and may be included with atelemetered characteristic monitor transmitter 30, the infusion device34, or a supplemental device. In preferred embodiments, the pre-filter,filters and the calibrator are included as part of the telemeteredcharacteristic monitor transmitter 30, and the controller 20 is includedwith the infusion device 34, as shown in FIG. 8B. In alternativeembodiments, the pre-filter is included with the telemeteredcharacteristic monitor transmitter 30 and the filter and calibrator areincluded with the controller 12 in the infusion device, as shown in FIG.8C. In other alternative embodiments, the pre-filter may be includedwith the telemetered characteristic monitor transmitter 30, while thefilter and calibrator are included in the supplemental device 41, andthe controller is included in the infusion device, as shown in FIG. 8D.To illustrate the various embodiments in another way, FIG. 9 shows atable of the groupings of components (pre-filter, filters, calibrator,and controller) in various devices (telemetered characteristic monitortransmitter, supplemental device, and infusion device) from FIGS. 8A-D.In other alternative embodiments, a supplemental device contains some of(or all of) the components.

In preferred embodiments, the sensor system generates a message thatincludes information based on the sensor signal such as digital sensorvalues, pre-filtered digital sensor values, filtered digital sensorvalues, calibrated digital sensor values, commands, or the like. Themessage may include other types of information as well such as a serialnumber, an ID code, a check value, values for other sensed parameters,diagnostic signals, other signals, or the like. In particularembodiments, the digital sensor values Dsig may be filtered in thetelemetered characteristic monitor transmitter 30, and then the filtereddigital sensor values may be included in the message sent to theinfusion device 34 where the filtered digital sensor values arecalibrated and used in the controller. In other embodiments, the digitalsensor values Dsig may be filtered and calibrated before being sent tothe controller 12 in the infusion device 34. Alternatively, the digitalsensor values Dsig may be filtered, and calibrated and used in thecontroller to generate commands 22 that are then sent from thetelemetered characteristic monitor transmitter 30 to the infusion device34.

In further embodiments, additional optional components, such as apost-calibration filter, a display, a recorder, and a blood glucosemeter may be included in the devices with any of the other components orthey may stand-alone. Generally, if a blood glucose meter is built intoone of the devices, it will be co-located in the device that containsthe calibrator. In alternative embodiments, one or more of thecomponents are not used.

In preferred embodiments, RF telemetry is used to communicate betweendevices, such as the telemetered characteristic monitor transmitter 30and the infusion device 34, which contain groups of components. Inalternative embodiments, other communication mediums may be employedbetween devices such as wires, cables, IR signals, laser signals, fiberoptics, ultrasonic signals, or the like.

Filtering

In preferred embodiments, the digital sensor values Dsig and/or thederivative of the digital sensor values are processed, filtered,modified, analyzed, smoothed, combined, averaged, clipped, scaled,calibrated, or the like, to minimize the effects of anomalous datapoints before they are provided as an input to the controller. Inparticular embodiments, the digital sensor values Dsig are passedthrough a pre-filter 400 and then a filter 402 before they are passed tothe transmitter 70, as shown in FIG. 16. The filters are used to detectand minimize the effects of anomalous digital sensor values Dsig. Somecauses of anomalous digital sensor values Dsig may include temporarysignal transients caused by sensor separation from the subcutaneoustissue, sensor noise, power supply noise, temporary disconnects orshorts, and the like. In particular embodiments, each individual digitalsensor value Dsig is compared to maximum and minimum value-thresholds.In other particular embodiments, the differences between consecutivepairs of digital sensor values Dsig are compared withrate-of-change-thresholds for increasing or decreasing values.

Pre-Filter

In particular embodiments, the pre-filter 400 uses fuzzy logic todetermine if individual digital sensor values Dsig need to be adjusted.The pre-filter 400 uses a subset of a group of digital sensor valuesDsig to calculate a parameter and then uses the parameter to determineif individual digital sensor values Dsig need to be adjusted incomparison to the group as a whole. For example, the average of a subsetof a group of digital sensor values Dsig may be calculated, and thennoise thresholds may be placed above and below the average. Thenindividual digital sensor values Dsig within the group are compared tonoise thresholds and eliminated or modified if they are outside of thenoise thresholds.

A more detailed example is provided below to more clearly illustrate,but not limit, an embodiment of a pre-filter. A group of eight digitalsensor values Dsig are shown in FIG. 17 including a most recentlysampled value, labeled L, sampled from the analog sensor signal Isig attime i, and the seven previous values K, H, G, F, E, D, and C sampled attimes (i−1) through (i−7). An average value is calculated using the fourtemporally middle values in the group, H, G, F, and E sampled at times(i−2) through (i−5). The calculated average value is represented as adashed/dotted average line 404. A high noise threshold 406 isestablished at 100% above the average line 404. In other words, themagnitude of the high noise threshold 406 is two times the magnitude ofthe average line 404. A negative noise threshold 408 is established at50% below the average line 404. In other words, the magnitude of thenegative noise threshold 408 is one half of the magnitude of the averageline 404. The individual magnitudes of each of the eight values, L, K,H, G, F, E, D, and C are compared to the high and negative noisethresholds 406 and 408. If a value is above the high noise threshold 406or below the negative noise threshold 408 then the value is consideredanomalous and the anomalous value is replaced with the magnitude of theaverage line 404. In the example shown in FIG. 17, the value K is abovethe high noise threshold 406 so it is replaced with the average value M.Also, the value D is below the negative noise threshold 408 so it isreplaced with the average value N. In this way noisy signal spikes arereduced. Therefore, in the example, values L, K, H, G, F, E, D, and Care inputs to the pre-filter 400 and values L, M, H, G, F, E, N, and Care outputs from the pre-filter 400. In alternative embodiments, othernoise threshold levels (or percentages) may be used. In otheralternative embodiments, values outside of the thresholds may bereplaced with values other than the average value, such as the previousvalue, the value of the closest threshold, a value calculated byextrapolating a trend line through previous data, a value that iscalculated by interpolation between other values that are inside thethresholds, or the like.

In preferred embodiments, when any of a group's values are outside ofthe noise thresholds 406 or 408 then a warning flag is set. If one tothree values are outside of the noise thresholds 406 or 408, a ‘noise’flag is set. If more than three values are outside of the noisethresholds 406 or 408, a ‘discard’ flag is set which indicates that thewhole group of values should be ignored and not used. In alternativeembodiments, more or less values need be outside of the thresholds 406or 408 to trigger the ‘noise’ flag or the ‘discard’ flag.

In preferred embodiments, each digital sensor value Dsig is checked forsaturation and disconnection. To continue with the example of FIG. 17,each individual value is compared to a saturation threshold 410. If avalue is equal to or above the saturation threshold 410 then a‘saturation’ flag is set. In particular embodiments, when the‘saturation’ flag is set, a warning is provided to the user that thesensor 26 may need calibration or replacement. In further particularembodiments, if an individual digital sensor value Dsig is at or abovethe saturation threshold 410, the individual digital sensor value Dsigmay be ignored, changed to a value equal to the average line 404, or theentire group of values associated with the individual digital sensorvalue Dsig may be ignored. In preferred embodiments, the saturationthreshold 410 is set at about 16% below the maximum value of the rangeof digital sensor values that may be generated. In preferredembodiments, the maximum digital sensor value represents a glucoseconcentration greater than 150 mg/dl. In alternative embodiments, themaximum digital sensor value may represent larger or smaller a glucoseconcentrations depending on the range of expected glucose concentrationsto be measured, the sensor accuracy, the sensor system resolution neededfor closed loop control, or the like. The full range of values is thedifference between the maximum and the minimum digital sensor value thatmay be generated. Higher or lower saturation threshold levels may beused depending on an expected signal range of the sensor, sensor noise,sensor gains, or the like.

Similarly, in preferred embodiments, if a digital signal value Dsig isbelow a disconnect threshold 412, then a ‘disconnect’ flag is setindicating to a user that the sensor is not properly connected to thepower supply and that the power supply or sensor may need replacement orrecalibration. In further particular embodiments, if a digital sensorvalue Dsig is below the disconnect threshold 412, the individual valuemay be ignored, changed to a value equal to the average line 404, or theentire group of values associated with the individual digital sensorvalue Dsig may be ignored. In preferred embodiments, the disconnectthreshold 410 is set at about 20% of the full range of values. Higher orlower disconnect threshold levels may be used depending on an expectedsignal range of the sensor, sensor system noise, sensor gains, or thelike.

In alternative embodiments, other methods are used to pre-filter thedigital sensor values Dsig such as rate-of-change thresholds,rate-of-change squared thresholds, noise thresholds about a leastsquares fit line rather than about the average of a subset of a group'svalues, higher or lower noise threshold lines, or the like.

Noise Filter

After the digital sensor values Dsig are evaluated, and if necessary,modified by the pre-filter 400, the digital sensor values Dsig arepassed to the filter 402. The filter 402 may be used to reduce noise inparticular frequency bands. Generally the body's blood glucose level 18changes relatively slowly compared to a rate at which digital sensorvalues Dsig are collected. Therefore, high frequency signal componentsare typically noise, and a low pass filter may be used to improve thesignal to noise ratio.

In preferred embodiments, the filter 402 is a finite impulse response(FIR) filter used to reduce noise. In particular embodiments, the FIRfilter is a 7^(th) order filter tuned with a pass band for frequenciesfrom zero to 3 cycles per hour (c/hr) and a stop band for frequenciesgreater than about 6 c/hr, as shown in an example frequency responsecurve 414 in FIG. 18. However, typically FIR filters tuned with a passband for frequencies from zero up to between about 2 c/hr and 5 c/hr anda stop band beginning at 1.2 to three times the selected pass bandfrequency will sufficiently reduce noise while passing the sensorsignal. In particular embodiments, FIR filters tuned with a pass bandfor frequencies from zero up to between about 2 c/hr and 10 c/hr and astop band beginning at 1.2 to three times the selected pass bandfrequency will sufficiently reduce noise. In the 7^(th) order filter,unique weighting factors are applied to each of eight digital sensorvalues Dsig. The digital sensor values Dsig include the most recentlysampled value and the seven previous values. The effects of a low passfilter on a digital sensor values collected at one minute intervals isshown in FIGS. 19A and B. An unfiltered sensor signal curve 416 ofdigital sensor values is contrasted with a curve of the same signalafter the effects of a 7^(th) order FIR filter 418. The filtered signalcurve 418 is delayed and the peaks are smoother compared to theunfiltered sensor signal curve 416. In other particular embodiments,higher or lower order filters may be used. In still other particularembodiments, filter weighting coefficients may be applied to digitalsensor values Dsig collected at time intervals shorter or longer thanone minute depending on the desired sensor sample rate based on thebody's physiology, the computational capabilities of the telemeteredcharacteristic monitor transmitter 30, the sensor's response time, orthe like. In alternative embodiments, filters with other frequencyresponses may be used to eliminate other noise frequencies depending onthe type of sensor, noise from the power supply or other electronics,the sensor's interaction with the body, the effects of body motion onthe sensor signal, or the like. In still other alternative embodiments,the filter is an infinite impulse response (IIR) filter.

Delay Compensation Filter

Aside from noise reduction, a filter may used to compensate for timedelays. Ideally, a sensor would provide a real time, noise-freemeasurement of a parameter that a control system is intended to control,such as a blood glucose measurement. However, realistically there arephysiological, chemical, electrical, and algorithmic sources of timedelays that cause the sensor measurement to lag behind the present valueof blood glucose.

A physiological delay 422 is due to the time required for glucose tomove between blood plasma 420 and interstitial fluid (ISF). The delay isrepresented by the circled double headed arrow 422 in FIG. 20.Generally, as discussed above, the sensor 26 is inserted into thesubcutaneous tissue 44 of the body 20 and the electrodes 42 near the tipof the sensor 40 are in contact with interstitial fluid (ISF). But thedesired parameter to be measured is the concentration of blood glucose.Glucose is carried throughout the body in blood plasma 420. Through theprocess of diffusion, glucose moves from the blood plasma 420 into theISF of the subcutaneous tissue 44 and vice versa. As the blood glucoselevel 18 changes so does the glucose level in the ISF. But the glucoselevel in the ISF lags behind the blood glucose level 18 due to the timerequired for the body to achieve glucose concentration equilibriumbetween the blood plasma 420 and the ISF. Studies show the glucose lagtimes between blood plasma 420 and ISF vary between 0 to 30 minutes.Some parameters that may affect the glucose lag time between bloodplasma 420 and ISF are the individual's metabolism, the current bloodglucose level, whether the glucose level is rising, or falling, or thelike.

A chemical reaction delay 424 is introduced by the sensor response time,represented by the circle 424 surrounding the tip of the sensor 26 inFIG. 20. The sensor electrodes 42 are coated with protective membranesthat keep the electrodes 42 wetted with ISF, attenuate the glucoseconcentration, and reduce glucose concentration fluctuations on theelectrode surface. As glucose levels change, the protective membranesslow the rate of glucose exchange between the ISF and the electrodesurface. In addition, there is a chemical reaction delay simply due tothe reaction time for glucose to react with glucose oxidase GOX togenerate hydrogen peroxide, and the reaction time for a secondaryreaction, the reduction of hydrogen peroxide to water, oxygen and freeelectrons.

There is also a processing delay as the analog sensor signal Isig isconverted to digital sensor values Dsig. In preferred embodiments, theanalog sensor signal Isig is integrated over one-minute intervals andthen converted to a number of counts. In essence an A/D conversion timeresults in an average delay of 30 seconds. In particular embodiments,the one-minute values are averaged into 5-minute values before they aresent to the controller. The resulting average delay is two and one halfminutes. In alternative embodiments, longer or shorter integration timesare used resulting in longer or shorter delay times. In otherembodiments the analog sensor signal current Isig is continuouslyconverted to an analog voltage Vsig and a A/D converter samples thevoltage Vsig every 10 seconds. Then six 10-second values arepre-filtered and averaged to create a one-minute value. Finally, five1-minute values are filtered and then averaged creating a five-minutevalue resulting in an average delay of two and one half minutes. Otherembodiments use other electrical components or other sampling rates andresult in other delay periods.

Filters also introduce a delay due to the time required to acquire asufficient number of digital sensor values Dsig to operate the filter.Higher order filters, by definition, require more digital sensor valuesDsig. Aside from the most recent digital sensor value Dsig, FIR filtersuse a number of previous values equal to the order of the filter. Forexample, a 7^(th) order filter uses 8 digital sensor values Dsig. Thereis a time interval between each digital sensor value Dsig. To continuewith the example, if the time interval between digital sensor valuesDsig is one minute, then the oldest digital sensor value Dsig used in a7^(th) order FIR filter would be seven minutes old. Therefore, theaverage time delay for all of the values used in the filter is three anda half minutes. However, if the weighting factors associated with eachof the values are not equal then the time delay may be longer or shorterthan three and one half minutes depending on the effects of thecoefficients.

Preferred embodiments of the invention include a FIR filter thatcompensates for both the various time delays, of up to about 30 minutesas discussed above, and high frequency noise, greater than about 10 c/hralso discussed above. Particular embodiments employ a 7^(th) orderWeiner type FIR filter. The coefficients for the filter are selected tocorrect for time lags while simultaneously reducing high frequencynoise. An example of a frequency response curve 426 is shown in FIG. 21.The example frequency response curve 416 is generated for a Weinerfilter with a pass band for frequencies from zero up to about 8 c/hr anda stop band for frequencies greater than about 15 c/hr for a sensor witha sensitivity of about 20 μA/100 mg/dl. A study conducted with sensorsin dogs demonstrates that a FIR filter may be used to compensate fortime delays. During the study a filter was used to compensate for a timedelay of about 12 minutes. The results, presented in FIG. 22, show dots428 representing actual blood plasma glucose levels measured with ablood glucose meter, a broken line 430 representing sensor measurementswithout delay compensation, and a solid line 432 representing sensormeasurements with delay compensation. The sensor in the test wasabnormally low in sensitivity. Studies with average sensitivity sensorsin humans are indicating a time delay of about 3 to 10 minutes is morenormal. Other filter coefficients and other orders of filters may beused to compensate for the time delay and/or noise.

In alternative embodiments, other types of filters may be used as longas they remove a sufficient portion of the noise from the sensor signal.In other alternative embodiments, no time compensation is used if therate of change in the blood glucose level is slow compared to the timedelay. For example, a five-minute delay between blood plasma glucose anda sensor measurement does not have to be corrected for a closed loopglucose control system to function.

Derivative Filter

Further embodiments may include a filter to remove noise from thederivative of the sensor signal before the controller uses it. Aderivative is taken from the digital sensor values Dsig, which resultsin digital derivative sensor values (dDsig/dt). The digital derivativesensor values dDsig/dt are passed through a FIR filter. In particularembodiments, the derivative filter is at least a 7^(th) order FIR filtertuned to remove high frequency noise. In alternative embodiments, higheror lower order filters may be used and the filters may be tuned toremove various frequencies of noise. In other alternative embodiments, aderivative is taken from the glucose level error G_(E) values and thenpassed through a derivative filter 526, as shown in FIG. 37. In furtheralternative embodiments, a derivative is taken of an analog sensorsignal Isig and a hardware filter is used to remove noise.

Calibration

In preferred embodiments, after filtering, the digital sensor valuesDsig are calibrated with respect to one or more glucose referencevalues. The glucose reference values are entered into the calibrator andcompared to the digital sensor values Dsig. The calibrator applies acalibration algorithm to convert the digital sensor values Dsig, whichare typically in counts into blood glucose values. In particularembodiments, the calibration method is of the type described in U.S.patent application Ser. No. 09/511,580, filed on Feb. 23, 2000, entitled“GLUCOSE MONITOR CALIBRATION METHODS”, which is incorporated byreference herein. In particular embodiments, the calibrator is includedas part of the infusion device 34 and the glucose reference values areentered by the user into the infusion device 34. In other embodiments,the glucose reference values are entered into the telemeteredcharacteristic monitor transmitter 30 and the calibrator calibrates thedigital sensor values Dsig and transmits calibrated digital sensorvalues to the infusion device 34. In further embodiments, the glucosereference values are entered into a supplemental device where thecalibration is executed. In alternative embodiments, a blood glucosemeter is in communication with the infusion device 34, telemeteredcharacteristic monitor transmitter 30 or supplemental device so thatglucose reference values may be transmitted directly into the devicethat the blood glucose meter is in communication with. In additionalalternative embodiments, the blood glucose meter is part of the infusiondevice 34, telemetered characteristic monitor transmitter 30 orsupplemental device such as that shown in U.S. patent application Ser.No. 09/334,996, filed on Jun. 17, 1999, entitled “CHARACTERISTIC MONITORWITH A CHARACTERISTIC METER AND METHOD OF USING THE SAME”, which isincorporated by reference herein.

In preferred embodiments, to obtain blood glucose reference values, oneor more blood samples are extracted from the body 20, and a common,over-the-counter, blood glucose meter is used to measure the bloodplasma glucose concentration of the samples. Then a digital sensor valueDsig is compared to the blood glucose measurement from the meter and amathematical correction is applied to convert the digital sensor valuesDsig to blood glucose values. In alternative embodiments, a solution ofa known glucose concentration is introduced into the subcutaneous tissuesurrounding the sensor 26 by using methods and apparatus such asdescribed in U.S. patent application Ser. No. 09/395,530, filed on Sep.14, 1999, entitled “METHOD AND KIT FOR SUPPLYING A FLUID TO ASUBCUTANEOUS PLACEMENT SITE”, which is incorporated by reference herein,or by using injection, infusion, jet pressure, introduction through alumen, or the like. A digital sensor value Dsig is collected while thesensor 26 is bathed in the solution of known glucose concentration. Amathematical formula such as a factor, an offset, an equation, or thelike, is derived to convert the digital sensor value Dsig to the knownglucose concentration. The mathematical formula is then applied tosubsequent digital sensors values Dsig to obtain blood glucose values.In alternative embodiments, the digital sensor values Dsig arecalibrated before filtering. In additional alternative embodiments, thedigital sensor values Dsig are calibrated after pre-filtering and beforefiltering. In other alternative embodiments, the sensors are calibratedbefore they are used in the body or do not require calibration at all.

Sensor Signal Processing Systems

Before filtering and calibrating, generally the sensor signal isprocessed to convert the sensor signal from a raw form into a formacceptable for use in the filters and/or calibrator. In preferredembodiments, as shown in FIG. 10, an analog sensor signal Isig isdigitally quantified through an A/D converter 68 resulting in digitalsensor values Dsig that are transmitted by a transmitter 70 from thetelemetered characteristic monitor transmitter 30 to another device. Inparticular embodiments, the analog sensor signal Isig is an analogcurrent value that is converted to a digital sensor value Dsig in theform of a digital frequency measurement, as shown in FIG. 11 (a). Thegeneral circuit includes an integrator 72, a comparator 74, a counter76, a buffer 78, a clock 80 and the transmitter 70. The integrator 72generates a substantially ramped voltage signal (A), and theinstantaneous slope of the ramped voltage signal is proportional to themagnitude of the instantaneous analog sensor signal Isig. The comparator74 converts the ramped voltage signal (A) from the integrator 72 intosquare wave pulses (B). Each pulse from the comparator 74 increments thecounter 76 and also resets the integrator 72. The clock 80 periodicallytriggers the buffer 78 to store the present value from the counter 76and then resets the counter 76. The values stored in the buffer 78 arethe digital sensor values Dsig. The clock 80 may also periodicallysignal the transmitter 70 to send a value from the buffer 78. Inpreferred embodiments, the clock period is one minute. However, inalternative embodiments, the clock period may be adjusted based on howoften measurements are needed, sensor signal noise, sensor sensitivity,required measurement resolution, the type of signal to be transmitted,or the like. In alternative embodiments, a buffer is not used.

A/D Converters

Various A/D converter designs may be used in embodiments of the presentinvention. The following examples are illustrative, and not limiting,since other A/D converters may be used.

I to F (Current to Frequency (Counts)), Single Capacitor, QuickDischarge

In preferred embodiments, the integrator 72 consists of a first Op-Amp92 and a capacitor 82, shown in FIG. 12. The integrator 72 sums theanalog sensor signal Isig current by charging the capacitor 82 until thecapacitor voltage (A′) achieves a high reference voltage (VrefH). Thecapacitor voltage (A′) is measured at the output of the first Op-Amp 92.A second Op-Amp 94 is used as a comparator. When the capacitor voltage(A′) reaches VrefH, the comparator output (B′) changes from low to high.The high comparator output (B′) closes a reset switch 84 that dischargesthe capacitor 82 through a voltage source (V+). The high comparatoroutput (B′) also triggers a reference voltage switch 88 to close, whilesubstantially simultaneously an inverter 86 inverts the comparatoroutput (B′). And the inverter output (C′) triggers a reference voltageswitch 90 to open. The result is that the reference voltage of thecomparator is changed from VrefH to the low reference voltage (VrefL).

When the capacitor voltage (A′) is discharged to VrefL, the comparatoroutput (B′) returns to low, thus forming a pulse. The low comparatoroutput (B′) opens the reset switch 84 allowing the capacitor 82 to begincharging again.

Virtually simultaneously, the low comparator output (B′) also triggersthe reference voltage switch 88 to open and the inverter output (C′)triggers reference voltage switch 90 to close resulting in changing thecomparator reference voltage from VrefL back to VrefH.

I to F, Single Reversible Capacitor

In alternative embodiments, two or more integrator switches are used tocontrol the polarity of one or more capacitors. A particular embodimentis shown in FIG. 13. Generally, only one of the two integrator-switches110 and 112 is closed and the other integrator switch is open. When thefirst integrator switch 110 is closed, the second integrator switch 112is open and an integrator Op-Amp 114 sums the analog sensor signal Isigcurrent by charging a capacitor 116 until the capacitor voltage (A″)achieves a high reference voltage (VrefH). The comparator 120 comparesthe integrator output (A″) to the reference voltage VrefH. And when thecapacitor voltage (A″) reaches VrefH, the comparator output (B″) shiftsfrom low to high, initiating a pulse.

The high comparator output (B″) pulse causes the capacitor polarity toreverse using the following method. The high comparator output (B″)triggers the second integrator switch 112 to close while virtuallysimultaneously the inverter 118 inverts the comparator output (B″). Andthe low inverter output (C″) pulse triggers the first integrator switch110 to open. Once the capacitor's polarity is reversed, the capacitor116 discharges at a rate proportional to the analog sensor signal Isig.The high comparator output (B″) pulse also triggers the referencevoltage of the comparator to change form VrefH the low reference voltage(VrefL). When the capacitor voltage (A″) is discharged to VrefL, thecomparator output (B″) returns to low. The low comparator output (B″)opens the second integrator switch 112 and virtually simultaneously thehigh inverter output (C″) closes the first integrator switch 110allowing the capacitor 116 to begin charging again. The low comparatoroutput (B″) also triggers the comparator reference voltage to changefrom VrefL back to VrefH.

An advantage of this embodiment is that sensor signal errors, which maybe created due to capacitor discharge time, are reduced since themagnitude of the analog sensor signal Isig drives both the charging andthe discharging rates of the capacitor 116.

I to F, Dual Capacitor

In further alternative embodiments, more than one capacitor is used suchthat as one capacitor is charging, at a rate proportional to themagnitude of the analog sensor signal Isig, another capacitor isdischarging. An example of this embodiment is shown in FIG. 14. A seriesof three switches are used for each capacitor. A first group of switches210 is controlled by a latch voltage C′″, and a second group of switches212 are controlled by voltage D′″, which is the inverse of C′″.Substantially, only one group of switches is closed at a time. When thefirst group of switches 210 is closed, the voltage across a firstcapacitor 216 increases at a rate proportional to the analog sensorsignal Isig until the integrator voltage (A′″) at the output of Op-Amp214 achieves a reference voltage (Vref). At the same time one of theswitches shorts the circuit across a second capacitor 222 causing it todischarge. A comparator 220 compares the integrator output (A′″) to thereference voltage Vref. And when the integrator output (A′″) reachesVref, the comparator output (B′″) generates a pulse. The comparatoroutput pulse increments a counter 76, and triggers the latch outputvoltage C′″ from a latch 221 to toggle from a low voltage to a highvoltage. The change in the latch voltage C′″ causes the second group ofswitches 212 to close and the first group of switches 210 to open. Oneof the switches from the second group of switches 212 shorts the circuitacross the first capacitor 216 causing it to discharge. At the same timethe voltage across the second capacitor 222 increases at a rateproportional to the analog sensor signal Isig until the integratorvoltage (A′″) at the output of Op-Amp 214 achieves a reference voltage(Vref). Again, the comparator 220 compares the integrator output (A′″)to the reference voltage Vref. And when the integrator output (A′″)reaches Vref, the comparator output (B′″) generates a pulse. Thecomparator output pulse increments the counter 76, and triggers thelatch output voltage C′″ to toggle from a high voltage to a low voltage,which causes the switches to return to their initial position with thefirst group of switches 210 closed and the second group of switches 212to open.

In summary, as the blood glucose level 18 increases, the analog sensorsignal Isig increases, which causes the voltage coming out of theintegrator 72 to ramp up faster to the high reference voltage VrefH,which causes the comparator 74 to generate pulses more often, which addscounts to the counter 76 faster. Therefore, higher blood glucose levelsgenerate more counts per minute.

The charge storage capacity for the capacitors used in the integrator72, and the reference voltages VrefH, and VrefL are selected such thatthe count resolution for counts collected in a one-minute period at aglucose level of 200 mg/dl represents a blood glucose measurement errorof less than 1 mg/dl. In particular embodiments, VrefH is 1.1 volts andVrefL is 0.1 volts. Higher or lower reference voltages may be selectedbased on the magnitude of the analog sensor signal Isig, the capacity ofthe capacitors, and the desired measurement resolution. The sourcevoltage V+ is set to a voltage sufficiently high to discharge one ormore capacitors quickly enough that the discharge times do notsignificantly reduce the number of counts per minute at a blood glucoselevel of 200 mg/dl.

Pulse Duration Output Feature

In preferred embodiments, the transmitter 70 transmits the digitalsensor values Dsig from the buffer 78 whenever triggered by the clock80. However, in particular embodiments, the user or another individualmay use a selector 96 to choose other outputs to be transmitted from thetransmitter 70, as shown in FIG. 11B. In preferred embodiments, theselector 96 is in the form of a menu displayed on a screen that isaccessed by the user or another individual by using buttons on thesurface of the telemetered characteristic monitor transmitter 30. Inother embodiments, a dial selector, dedicated buttons, a touch screen, asignal transmitted to the telemetered characteristic monitor transmitter30, or the like, may be used. Signals that may be selected to betransmitted, other than the digital sensor values Dsig, include, but arenot limited to, a single pulse duration, digital sensor values beforepre-filtering, digital sensor values after pre-filtering but beforefiltering, digital sensor values after filtering, or the like.

In particular embodiments, a pulse duration counter 98 counts clockpulses from a pulse duration clock 100 until the pulse duration counter98 is reset by a rising or falling edge of a pulse from the comparator74, as shown in FIG. 11B. The accumulated count at the time that thepulse duration counter 98 is reset represents the pulse duration for aportion of a single pulse from the comparator 74. The accumulated countfrom the pulse duration counter 98 is stored in the single pulse buffer102 when triggered by the reset signal. When an individual selects thesingle pulse output, the transmitter 70 transmits the values from thesingle pulse buffer 102. The pulse duration clock 100 period must besufficiently shorter than the period between individual pulse edges fromthe comparator 74 given a high analog sensor signal Isig to havesufficient resolution to quantify different pulse durations from thecomparator 74.

I to V (Current to Voltage), Voltage A/D

Alternative methods may be used to convert the analog sensor signal Isigfrom an analog current signal to a digital voltage signal. The analogsensor signal Isig is converted to an analog voltage Vsig using an OpAmp 302 and a resistor 304, as shown in FIG. 15. And then periodically aclock 308 triggers an A/D converter 306 to take a sample value from theanalog voltage Vsig and convert it to a digital signal representing themagnitude of the voltage. The output values of the A/D converter 306 aredigital sensor values Dsig. The digital sensor values Dsig are sent to abuffer 310 and then to the transmitter 70. In particular embodiments,the resistor 304 may be adjusted to scale the Vsig to use a significantportion of the range of the voltage A/D converter 306 depending on thesensor sensitivity, the maximum glucose concentration to be measured,the desired resolution from the voltage A/D converter 306, or the like.

In alternative embodiments, a buffer 310 is not needed and the digitalsensor values Dsig are sent from the A/D converter directly to thetransmitter 70. In other alternative embodiments, the digital sensorvalues Dsig are processed, filtered, modified, analyzed, smoothed,combined, averaged, clipped, scaled, calibrated, or the like, beforebeing sent to the transmitter 70. In preferred embodiments, the clock308 triggers a measurement every 10 seconds. In alternative embodiments,the clock 308 runs faster or slower triggering measurements more or lessfrequently depending on how quickly the blood glucose level can change,the sensor sensitivity, how often new measurements are needed to controlthe delivery system 14, or the like.

Finally, in other alternative embodiments, other sensor signals fromother types of sensors, as discussed in the section “Sensor and SensorSet” below, are converted to digital sensor values Dsig if necessarybefore transmitting the digital sensor values Dsig to another device.

Additional Controller Inputs

Generally, the proportional plus, integral plus, derivative (PID)insulin response controller uses only glucose (digital sensor valuesDsig) as an input. Conversely, in a normally glucose tolerant humanbody, healthy β-cells benefit from additional inputs such as neuralstimulation, gut hormone stimulation, changes in free fatty acid (FFA)and protein stimulation etc. Thus in other alternative embodiments, thePID controller, as discussed above, can be augmented with one or moreadditional inputs. In particular alternative embodiments, the user maymanually input supplemental information such as a start of a meal, ananticipated carbohydrate content of the meal, a start of a sleep cycle,an anticipated sleep duration, a start of an exercise period, ananticipated exercise duration, an exercise intensity estimation, or thelike. Then, a model predictive control feature assists the controller touse the supplemental information to anticipate changes in glucoseconcentration and modify the output commands accordingly. For example,in a NGT individual, neural stimulation triggers the β-cells to begin tosecrete insulin into the blood stream before a meal begins, which iswell before the blood glucose concentration begins to rise. So, inalternative embodiments, the user can tell the controller that a meal isbeginning and the controller will begin to secrete insulin inanticipation of the meal.

In other alternative embodiments, the user or another individual maymanually override the control system or select a different controlleralgorithm. For instance, in particular alternative embodiments, anindividual may select to normalize to a basal glucose level immediately,and instead of using the β-cell emulating PID controller anothercontroller would take over such as a PID controller with differentgains, a PD controller for rapid glucose adjustment, or the like.Additional alternative embodiments allow an individual to turn off theintegral component of the PID controller once the glucose level isnormalized and no meals are anticipated. In other particular alternativeembodiments, the user may select to turn off the controller entirely,therefore disengaging the closed loop system. Once the closed loopsystem is not controlling insulin dosing, the user may program theinfusion device with a basal rate, variable basal rates, boluses, or thelike, or the user may manually enter each individual dosage when it isneeded.

In still other alternative embodiments, more than one bodycharacteristic is measured, and the measurements are provided as inputsto a controller. Measured body characteristics that may be used by thecontroller include, but are not limited to, the blood glucose level,blood and/or ISF pH, body temperature, the concentration of amino acidsin blood (including arginine and/or lysine, and the like), theconcentration of gastrointestinal hormones in blood or ISF (includinggastrin, secretin, cholecystokinin, and/or gastro inhibitory peptide,and the like), the concentration of other hormones in blood or ISF(including glucagons, growth hormone, cortisol, progesterone and/orestrogen, and the like), blood pressure, body motion, respiratory rate,heart rate, and other parameters.

In NGT individuals, the glucose-induced secretion of insulin by healthyβ-cells may be as much as doubled in the presence of excess amino acids.Yet, the presence of excess amino acids alone, without elevated bloodglucose, only mildly increases insulin secretions according to theTextbook of Medical Physiology, Eighth Edition, written by Arthur C.Guyton, published by W. B. Saunders Company, 1991, Ch. 78, pg. 861,section “Other Factors That Stimulate Insulin Secretion”. In particularalternative embodiments, amino acid concentrations are estimated ormeasured, and the controller's insulin response increases when aminoacid concentrations are sufficiently high.

In NGT individuals, the presence of sufficient quantities ofgastrointestinal hormones in the blood causes an anticipatory increasein blood insulin, which suggests that β-cells release insulin beforeincreases in blood glucose due to an individual's anticipation of ameal. In particular alternative embodiments, the concentration ofgastrointestinal hormones is measured or estimated, and whenconcentrations are high enough to indicate that a meal is anticipated,the controller commands are adjusted to cause insulin introduction intothe body even before the blood glucose level changes. In otheralternative embodiments, the controller uses measurements or estimatesof other hormones to modify the rate of insulin secretion.

In NGT individuals, the body's cells take up glucose during periods ofheavy exercise with significantly lower levels of insulin. Inalternative embodiments, physiologic parameters such as body motion,blood pressure, pulse rate, respiratory rate, or the like, are used todetect periods of heavy exercise by the body and therefore provideinputs to the controller that decreases (or eliminates) the amount ofinsulin infused into the body to compensate for glucose concentrations.

Sensor Compensation and End-of-Life Detection

In particular embodiments, the sensor sensitivity 510 may degrade overtime, as shown in FIG. 31B. As the sensor sensitivity 510 changes thesensor signal accuracy degrades. If the sensor sensitivity 510 changessignificantly then the sensor must be recalibrated or replaced. Adiagnostic signal may be used to evaluate whether sensor signal accuracyhas changed and/or may be used to adjust the signal or to indicate whento recalibrate or replace the sensor. As the sensor sensitivity 510decreases, the measured glucose level 512 using the sensor signalunderestimates the actual blood glucose level 514, and the measurementerror 516 between the measured glucose level 512 and the actual bloodglucose level 514 becomes greater over time, as shown in FIG. 31A. Thesensor sensitivity 510 decreases due to increases in sensor resistanceRs, as shown in FIG. 31C. The sensor resistance Rs is the resistanceprovided by the body between the working electrode WRK and the counterelectrode CNT, shown as the sum or R1 and R2 in the circuit diagram ofFIG. 7. The sensor resistance Rs can be obtained indirectly by measuringthe analog sensor signal Isig and the counter electrode voltage Vcnt andthen calculating the resistance,Rs=Vcnt/Isig.As the sensor resistance Rs increases, the analog sensor signal Isigresponse to a given glucose concentration decreases. In preferredembodiments, the decrease in the analog sensor signal Isig may becompensated for by identifying the amount that the sensor resistance Rshas changed since the last calibration and then using the change inresistance in a correction algorithm 454 to adjust the analog sensorsignal value. A compensation value calculated by the correctionalgorithm 454 is used to increase the sensor analog signal value. Thecompensation value increases over time as the sensor resistance Rsincreases. The correction algorithm 454 includes at least one value thatvaries with changes in sensor resistance Rs. In particular embodiments,a low pass filter is applied to the sensor resistance Rs measurement todecrease high frequency noise before evaluating how much the sensorresistance Rs has changed since the last calibration.

In alternative embodiments, the sensor resistance Rs may be calculatedusing different equations. For instance, a sensor resistance Rs₂ may becalculated as:Rs ₂=(V ₀ −Vcnt)/IsigIn particular embodiments, V₀ is the same voltage as Vset. An advantageof this approach is that it accounts for the voltage level Vset, whichcan vary from sensor to sensor and/or monitor to monitor, and/or as theanalog sensor signal changes. This removes the noise and/or offsetassociated with variations in Vset, and can provide a more accurateindication of sensor resistance. In other particular embodiments, V₀ isset at −0.535 volts, which is a commonly used voltage for Vset. Infurther embodiments, V₀ is calculated from paired measurements of Vcntand Isig. Using least squares or another curve fitting method, amathematical equation representing the curve (typically a straight lineequation) is derived from the relationship between Vcnt and Isig. Then,V₀ is obtained by extrapolating the curve to find the value for Vcntwhen Isig is zero.

FIGS. 38A-H show a comparison between calculating the sensor resistancewith V₀ and without V₀. The plot of the derivative of Rs₂ shown in FIG.38G is cleaner and indicates the sensor failure more clearly than theplot of the derivative of Rs shown in FIG. 38F. Hence sensor resistanceRs₂ may be used instead of, or in conjunction with, sensor resistance Rsdescribed above.

In preferred embodiments, the sensor is recalibrated or replaced whenthe change in the sensor resistance Rs since the last calibrationexceeds a threshold, or the rate of change of the sensor resistancedRs/dt exceeds another threshold. In particular embodiments, the rate ofchange of the sensor resistance dRs/dt may be compared to two thresholdsas shown in FIG. 32. If dRs/dt exceeds a ‘replacement’ threshold then awarning is provided to the user to replace the sensor. If dRs/dt exceedsa ‘recalibrate’ threshold then a warning is provided to the user torecalibrate the sensor.

In an example shown in FIGS. 33A-C, the analog sensor signal Isigdecreases dramatically at approximately 0.3 days, as seen in FIG. 33A.Given only the analog sensor signal Isig, the user would believe thatthe decrease in the analog sensor signal Isig is due to a decrease inblood glucose. But in reality the drop in the analog sensor signal Isigis due to a sudden change in sensor sensitivity. The sensor resistanceRs, shown in FIG. 33A increases as the analog sensor signal Isig dropsat about 0.3 days. The derivative of the sensor resistance dRs/dt, shownin FIG. 33C, clearly shows a spike 522 at about 0.3 days when the analogsensor signal Isig dropped. The spike 522 in the change in sensorresistance dRs/dt indicates a sensor anomaly rather than a realisticdrop in blood glucose. If a threshold were placed at +/−4 on the dRs/dt,the user would have received a warning to replace the sensor at about0.3 days. As seen in FIG. 33A, the sensor was not replaced until about1.4 days. The analog sensor signal Isig was under estimating the trueglucose level from about 0.3 days until the sensor was replaced at about1.4 days.

In particular embodiments, the amount of time dt over which thederivative of the sensor resistance Rs is taken is the entire time sincethe last calibration. In other embodiments, the amount of time dt overwhich the derivative is taken is fixed, for example over the last hour,90 minutes, 2 hours, or the like.

In alternative embodiments, the sensor is recalibrated or replaced whenthe integral of the sensor resistance Rs over a predetermined timewindow (∫Rs d/dt) exceeds a predetermined resistance integral threshold.An advantage to this approach is that it tends to filter out potentialnoise that could be encountered from a signal that includes occasionalspikes, sudden variations in voltage levels, or the like. Preferably,the integral of the sensor resistance Rs is calculated over a timewindow (such as 15 minutes, or the like) based on Rs measurementsobtained at set rates (such as 1 minute, 5 minutes, or the like) duringthe time window. In alternative embodiments, the time windows may belonger or shorter and different sampling rates may be used, with theselection being dependent on noise, response of the system, samplingrate used in the controller, or the like. In further embodiments, thetime windows and sampling rates may change over time, such as whenapproaching the end of the expected sensor life, or as the equationsindicate that the sensor is degrading, or the like.

Like above, multiple thresholds may be used. For instance, if ∫Rs d/dtexceeds a ‘replacement’ threshold then a warning is provided to the userto replace the sensor. And if ∫Rs d/dt exceeds a ‘recalibrate’ thresholdthen a warning is provided to the user to recalibrate the sensor. Infurther alternative embodiments, the counter electrode voltage Vcnt isused to evaluate other characteristics such as, sensor accuracy, sensorbio-fouling, sensor function, sensor voltage operating range, sensorattachment, or the like.

pH Controller Input

In alternative embodiments, the controller uses measurements of both theinterstitial fluid (ISF) glucose level and a local pH in the ISFsurrounding the sensor to generate commands for the infusion device. Inparticular alternative embodiments, a single multi-sensor 508 located inthe subcutaneous tissue is used to measure both the glucose level andthe pH. The tip of the multi-sensor 508 that is placed into thesubcutaneous tissue with three electrodes is shown in FIG. 30. Theworking electrode 502 is plated with platinum black and coated withglucose oxidase (GOX). The reference electrode 506 is coated withsilver-silver chloride. And the counter electrode 504 is coated withiridium oxide (Ir Ox). The analog sensor signal Isig is generated at theworking electrode 502 due to the reaction between glucose oxidase GOXand the ISF glucose as described with the preferred sensor embodiment.In this alternative embodiment however, as glucose in the ISF reactswith the glucose oxidase GOX on the working electrode and gluconic acidis generated, the local pH in the ISF surrounding the sensor decreases,which changes the potential of the iridium oxide on the counterelectrode 504, with respect to the reference electrode REF. So, as thepH decreases, the voltage at the counter electrode 504 increases.Therefore, as the glucose concentration increases, the local pHdecreases, which causes the counter electrode voltage to increase. So,the glucose concentration may be estimated based on the counterelectrode voltage. The counter electrode voltage estimate of glucoseconcentration can be compared to the estimate of glucose level from theanalog sensor signal Isig. The two estimates of the glucose level may becombined by a weighted average or one estimate may simply be used as acheck to verify that the other sensing method is functioning properly.For example, if the difference between the two estimates is 10% for aperiod of time and then suddenly the difference increased to 50%, awarning would be issued indicating to the user that the sensor may needto be replaced or recalibrated.

In additional alternative embodiments, the pH level near the sensor maybe used to detect infection. By tracking trends in the pH over time, adramatic change in pH may be used to identify that an infection hasdeveloped in proximity to the sensor. A warning is used to notify theuser to replace the sensor.

The pH sensor may be used in other embodiments. When insulin is notavailable to assist the body to use glucose, the body shifts toconsuming fat for energy. As the body shifts from using glucose to usingalmost exclusively fat for energy, concentrations of keto acids(acetoacetic acid and β-hydroxybutyric acid) increase from about 1mEq/liter to as high as 10 mEq/liter. In particular alternativeembodiments, the pH level is measured to detect increases in keto acidsin the body. In embodiments of the present invention, a warning isprovided to the user when the ISF pH level is too low.

A side effect of the increased of keto acid concentrations is thatsodium is drawn from the body's extra cellular fluid to combine with theacids so that the body can excrete the acids. This leads to increasedquantities of hydrogen ions, which greatly increases the acidosis.Severe cases lead to rapid deep breathing, acidotic coma and even death.In other alternative embodiments, an ion-selective electrode (ISE) isused to detect changes in sodium concentration. A special membrane isused to coat the ISE so that it only senses changes in sodiumconcentration. In particular alternative embodiments, the ISE is afourth electrode added to the glucose sensor. In another alternativeembodiment, a three-electrode system is used with a silver-silverchloride reference electrode REF, an Ir Ox counter electrode CNT, and asodium ion-selective (Na ISE) working electrode WRK.

While pH measurements, end-of-life measurements, hormone measurements,or the like, add inputs to the controller that can significantly affectthe accuracy of insulin delivery, the basic input to the controller isgenerally a glucose measurement. The glucose measurement is provided bythe sensor system. And once the controller uses the glucose measurementto generate commands, the delivery system executes the commands. Thefollowing is a detailed description of several apparatus embodiments forthe sensor system and the delivery system.

Sensor System

The sensor system provides the glucose measurements used by thecontroller. The sensor system includes a sensor, a sensor set to holdthe sensor if needed, a telemetered characteristic monitor transmitter,and a cable if needed to carry power and/or the sensor signal betweenthe sensor and the telemetered characteristic monitor transmitter.

Sensor and Sensor Set

In preferred embodiments, the glucose sensor system 10 includes a thinfilm electrochemical sensor such as the type disclosed in U.S. Pat. No.5,391,250, entitled “METHOD OF FABRICATING THIN FILM SENSORS”; U.S.patent application Ser. No. 09/502,204, filed on Feb. 10, 2000, entitled“IMPROVED ANALYTE SENSOR AND METHOD OF MAKING THE SAME”; or othertypical thin film sensors such as described in commonly assigned U.S.Pat. Nos. 5,390,671; 5,482,473; and 5,586,553 which are incorporated byreference herein. See also U.S. Pat. No. 5,299,571.

The glucose sensor system 10 also includes a sensor set 28 to supportthe sensor 26 such as described in U.S. Pat. No. 5,586,553, entitled“TRANSCUTANEOUS SENSOR INSERTION SET” (published as PCT Application WO96/25088); and U.S. Pat. No. 5,954,643, entitled “INSERTION SET FOR ATRANSCUTANEOUS SENSOR” (published as PCT Application WO 98/56293); andU.S. Pat. No. 5,951,521, entitled “A SUBCUTANEOUS IMPLANTABLE SENSOR SETHAVING THE CAPABILITY TO REMOVE OR DELIVER FLUIDS TO AN INSERTION SITE”,which are incorporated by reference herein.

In preferred embodiments, the sensor 26 is inserted through the user'sskin 46 using an insertion needle 58, which is removed and disposed ofonce the sensor is positioned in the subcutaneous tissue 44. Theinsertion needle 58 has a sharpened tip 59 and an open slot 60 to holdthe sensor during insertion into the skin 46, as shown in FIGS. 3C and Dand FIG. 4. Further description of the needle 58 and the sensor set 28are found in U.S. Pat. No. 5,586,553, entitled “TRANSCUTANEOUS SENSORINSERTION SET” (published as PCT Application WO 96/25088); and U.S. Pat.No. 5,954,643, entitled “INSERTION SET FOR A TRANSCUTANEOUS SENSOR”(published as PCT Application WO 98/5629), which are incorporated byreference herein.

In preferred embodiments, the sensor 26 has three electrodes 42 that areexposed to the interstitial fluid (ISF) in the subcutaneous tissue 44 asshown in FIGS. 3D and 4. A working electrode WRK, a reference electrodeREF and a counter electrode CNT are used to form a circuit, as shown inFIG. 7. When an appropriate voltage is supplied across the workingelectrode WRK and the reference electrode REF, the ISF providesimpedance (R1 and R2) between the electrodes 42. And an analog currentsignal Isig flows from the working electrode WRK through the body (R1and R2, which sum to Rs) and to the counter electrode CNT. Preferably,the working electrode WRK is plated with platinum black and coated withglucose oxidase (GOX), the reference electrode REF is coated withsilver-silver chloride, and the counter electrode is plated withplatinum black. The voltage at the working electrode WRK is generallyheld to ground, and the voltage at the reference electrode REF issubstantially held at a set voltage Vset. Vset is between 300 and 700mV, and preferably to about 535 mV.

The most prominent reaction stimulated by the voltage difference betweenthe electrodes is the reduction of glucose as it first reacts with GOXto generate gluconic acid and hydrogen peroxide (H₂O₂). Then the H₂O₂ isreduced to water (H₂O) and (O⁻) at the surface of the working electrodeWRK. The O⁻ draws a positive charge from the sensor electricalcomponents, thus repelling an electron and causing an electrical currentflow. This results in the analog current signal Isig being proportionalto the concentration of glucose in the ISF that is in contact with thesensor electrodes 42. The analog current signal Isig flows from theworking electrode WRK, to the counter electrode CNT, typically through afilter and back to the low rail of an op-amp 66. An input to the op-amp66 is the set voltage Vset. The output of the op-amp 66 adjusts thecounter voltage Vcnt at the counter electrode CNT as Isig changes withglucose concentration. The voltage at the working electrode WRK isgenerally held to ground, the voltage at the reference electrode REF isgenerally equal to Vset, and the voltage Vcnt at the counter electrodeCNT varies as needed.

In alternative embodiments, more than one sensor is used to measureblood glucose. In particular embodiments, redundant sensors are used.The user is notified when a sensor fails by the telemeteredcharacteristic monitor transmitter electronics. An indicator may alsoinform the user of which sensors are still functioning and/or the numberof sensors still functioning. In other particular embodiments, sensorsignals are combined through averaging or other means. If the differencebetween the sensor signals exceeds a threshold then the user is warnedto recalibrate or replace at least one sensor. In other alternativeembodiments, more than one glucose sensor is used, and the glucosesensors are not of the same design. For example, an internal glucosesensor and an external glucose sensor may be used to measure bloodglucose at the same time.

In alternative embodiments, other continuous blood glucose sensors andsensor sets may be used. In particular alternative embodiments, thesensor system is a micro needle analyte sampling device such asdescribed in U.S. patent application Ser. No. 09/460,121, filed on Dec.13, 1999, entitled “INSERTION SET WITH MICROPIERCING MEMBERS AND METHODSOF USING THE SAME”, incorporated by reference herein, or an internalglucose sensor as described in U.S. Pat. Nos. 5,497,772; 5,660,163;5,791,344; and 5,569,186, and/or a glucose sensor that uses florescencesuch as described in U.S. Pat. No. 6,011,984 all of which areincorporated by reference herein. In other alternative embodiments, thesensor system uses other sensing technologies such as described inPatent Cooperation Treaty publication No. WO 99/29230, light beams,conductivity, jet sampling, micro dialysis, micro-poration, ultra sonicsampling, reverse iontophoresis, or the like. In still other alternativeembodiments, only the working electrode WRK is located in thesubcutaneous tissue and in contact with the ISF, and the counter CNT andreference REF electrodes are located external to the body and in contactwith the skin. In particular embodiments, the counter electrode CNT andthe reference electrode REF are located on the surface of a monitorhousing 518 and are held to the skin as part of the telemeteredcharacteristic monitor, as shown in FIG. 34A. In other particularembodiments, the counter electrode CNT and the reference electrode REFare held to the skin using other devices such as running a wire to theelectrodes and taping the electrodes to the skin, incorporating theelectrodes on the underside of a watch touching the skin, or the like.In more alternative embodiments, more than one working electrode WRK isplaced into the subcutaneous tissue for redundancy. In additionalalternative embodiments, a counter electrode is not used, a referenceelectrode REF is located outside of the body in contact with the skin,and one or more working electrodes WRK are located in the ISF. Anexample of this embodiment implemented by locating the referenceelectrode REF on a monitor housing 520 is shown in FIG. 34B. In otherembodiments, ISF is harvested from the body of an individual and flowedover an external sensor that is not implanted in the body.

Sensor Cable

In preferred embodiments, the sensor cable 32 is of the type describedin U.S. Patent Application Ser. No. 60/121,656, filed on Feb. 25, 1999,entitled “TEST PLUG AND CABLE FOR A GLUCOSE MONITOR”, which isincorporated by reference herein. In other embodiments, other cables maybe used such as shielded, low noise cables for carrying nA currents,fiber optic cables, or the like. In alternative embodiments, a shortcable may be used or the sensor may be directly connected to a devicewithout the need of a cable.

Telemetered Characteristic Monitor Transmitter

In preferred embodiments, the telemetered characteristic monitortransmitter 30 is of the type described in U.S. patent application Ser.No. 09/465,715, filed on Dec. 17, 1999, entitled “TELEMETEREDCHARACTERISTIC MONITOR SYSTEM AND METHOD OF USING THE SAME” (publishedas PCT Application WO 00/19887 and entitled, “TELEMETERED CHARACTERISTICMONITOR SYSTEM”), which is incorporated by reference herein, and isconnected to the sensor set 28 as shown in FIGS. 3A and B.

In alternative embodiments, the sensor cable 32 is connected directly tothe infusion device housing, as shown in FIG. 8A, which eliminates theneed for a telemetered characteristic monitor transmitter 30. Theinfusion device contains a power supply and electrical components tooperate the sensor 26 and store sensor signal values.

In other alternative embodiments, the telemetered characteristic monitortransmitter includes a receiver to receive updates or requests foradditional sensor data or to receive a confirmation (a hand-shakesignal) indicating that information has been received correctly.Specifically, if the telemetered characteristic monitor transmitter doesnot receive a confirmation signal from the infusion device, then itre-sends the information. In particular alternative embodiments, theinfusion device anticipates receiving blood glucose values or otherinformation on a periodic basis. If the expected information is notsupplied when required, the infusion device sends a ‘wake-up’ signal tothe telemetered characteristic monitor transmitter to cause it tore-send the information.

Insulin Delivery System

Infusion Device

Once a sensor signal 16 is received and processed through the controller12, commands 22 are generated to operate the infusion device 34. Inpreferred embodiments, semi-automated medication infusion devices of theexternal type are used, as generally described in U.S. Pat. Nos.4,562,751; 4,678,408; 4,685,903; and U.S. patent application Ser. No.09/334,858, filed on Jun. 17, 1999, entitled “EXTERNAL INFUSION DEVICEWITH REMOTE PROGRAMMING, BOLUS ESTIMATOR AND/OR VIBRATION CAPABILITIES”(published as PCT application WO 00/10628), which are hereinincorporated by reference. In alternative embodiments, automatedimplantable medication infusion devices, as generally described in U.S.Pat. Nos. 4,373,527 and 4,573,994, are used, which are incorporated byreference herein.

Insulin

In preferred embodiments, the infusion device reservoir 50 containsHumalog® lispro insulin to be infused into the body 20. Alternatively,other forms of insulin may be used such as Humalin®, human insulin,bovine insulin, porcine insulin, analogs, or other insulins such asinsulin types described in U.S. Pat. No. 5,807,315, entitled “METHOD ANDCOMPOSITIONS FOR THE DELIVERY OF MONOMERIC PROTEINS”, and U.S. PatentApplication Ser. No. 60/177,897, filed on Jan. 24, 2000, entitled “MIXEDBUFFER SYSTEM FOR STABILIZING POLYPEPTIDE FORMULATIONS”, which areincorporated by reference herein, or the like. In further alternativeembodiments, other components are added to the insulin such aspolypeptides described in U.S. patent application Ser. No. 09/334,676,filed on Jun. 25, 1999, entitled “MULTIPLE AGENT DIABETES THERAPY”,small molecule insulin mimetic materials such as described in U.S.patent application Ser. No. 09/566,877, filed on May 8, 2000, entitled“DEVICE AND METHOD FOR INFUSION OF SMALL MOLECULE INSULIN MIMETICMATERIALS”, both of which are incorporated by reference herein, or thelike.

Infusion Tube

In preferred embodiments, an infusion tube 36 is used to carry theinsulin 24 from the infusion device 34 to the infusion set 38. Inalternative embodiments, the infusion tube carries the insulin 24 frominfusion device 34 directly into the body 20. In further alternativeembodiments, no infusion tube is needed, for example if the infusiondevice is attached directly to the skin and the insulin 24 flows fromthe infusion device, through a cannula or needle directly into the body.In other alternative embodiments, the infusion device is internal to thebody and an infusion tube may or may not be used to carry insulin awayfrom the infusion device location.

Infusion Set

In preferred embodiments, the infusion set 38 is of the type describedin U.S. Pat. No. 4,755,173, entitled “SOFT CANNULA SUBCUTANEOUSINJECTION SET”, which is incorporated by reference herein. Inalternative embodiments, other infusion sets, such as the Rapid set fromDisetronic, the Silhouette from MiniMed, or the like, may be used. Infurther alternative embodiments, no infusion set is required, forexample if the infusion device is an internal infusion device or if theinfusion device is attached directly to the skin.

Configurations with Supplemental Devices

In further alternative embodiments, the pre-filter, filters, calibratorand/or controller 12 are located in a supplemental device that is incommunication with both the telemetered characteristic monitortransmitter 30 and the infusion device 34. Examples of supplementaldevices include, a hand held personal digital assistant such asdescribed in U.S. patent application Ser. No. 09/487,423, filed on Jan.20, 2000, entitled “HANDHELD PERSONAL DATA ASSISTANT (PDA) WITH AMEDICAL DEVICE AND METHOD OF USING THE SAME”, which is incorporated byreference herein, a computer, a module that may be attached to thetelemetered characteristic monitor transmitter 30, a module that may beattached to the infusion device 34, a RF programmer such as described inU.S. patent application Ser. No. 09/334,858, filed on Jun. 17, 1999,entitled EXTERNAL INFUSION DEVICE WITH REMOTE PROGRAMMING, BOLUSESTIMATOR AND/OR VIBRATION CAPABILITIES (published as PCT application WO00/10628), which is incorporated by reference herein, or the like. Inparticular embodiments, the supplemental device includes apost-calibration filter, a display, a recorder, and/or a blood glucosemeter. In further alternative embodiments, the supplemental deviceincludes a method for a user to add or modify information to becommunicated to the infusion device 34 and/or the telemeteredcharacteristic monitor transmitter 30 such as buttons, a keyboard, atouch screen, and the like.

In particular alternative embodiments, the supplemental device is acomputer in combination with an analyte monitor and a RF programmer. Theanalyte monitor receives RF signals from the telemetered characteristicmonitor transmitter 30, stores the signals and down loads them to acomputer when needed. The RF programmer sends control signals to theinfusion device 34 to reprogram the rate of insulin infusion. Both theanalyte monitor and the RF programmer are placed into separatecommunication stations. The communication stations include IRtransmitters and IR receivers to communicate with the analyte monitorand the RF programmer. The sensor signal values are transmitted via thetelemetered characteristic monitor transmitter 30 to the analyte monitorlocated in one of the communication stations. Then the sensor signalvalues are communicated through the IR receiver in a first communicationstation and to the computer. The computer processes the sensor signalvalues through one or more filters, calibrators, and controllers togenerate commands 22. The commands are sent to a second communicationstation and sent to an RF programmer by the IR transmitter in thecommunication station. Finally the RF programmer transmits the commands22 to the infusion device 34. The communication station, analyte monitorand infusion device 34 may be of the type described in U.S. patentapplication Ser. No. 09/409,014, filed on Sep. 29, 1999 entitledCOMMUNICATION STATION FOR INTERFACING WITH AN INFUSION PUMP, ANALYTEMONITOR, ANALYTE METER OR THE LIKE (published as a PCT application WO00/18449), which is incorporated by reference herein. Alternatively, theRF programmer may be omitted and the infusion device may be placed in acommunication station, or the infusion device may receive the commandswithout the use of an RF programmer and/or a communication station.

While the description above refers to particular embodiments of thepresent invention, it will be understood that many modifications may bemade without departing from the spirit thereof. The accompanying claimsare intended to cover such modifications as would fall within the truescope and spirit of the present invention.

The presently disclosed embodiments are therefore to be considered inall respects as illustrative and not restrictive, the scope of theinvention being indicated by the appended claims, rather than theforegoing description, and all changes which come within the meaning andrange of equivalency of the claims are therefore intended to be embracedtherein.

1. A method of infusing insulin into a body of a user, the methodcomprising: delivering a basal amount of insulin to the body of the userat a predetermined basal rate; determining at least one state variable;determining, based on the at least one state variable, an additionalamount of insulin to be delivered to the body of the user; infusing thedetermined additional amount of insulin to the body of the user; andreducing the basal rate by said additional amount of insulin.
 2. Themethod of claim 1, wherein the at least one state variable is selectedfrom the group consisting of subcutaneous insulin concentration, plasmainsulin concentration, and insulin effect.
 3. The method of claim 1,wherein the determining at least one state variable includes determiningsubcutaneous insulin concentration, plasma insulin concentration, andinsulin effect.
 4. The method of claim 1, wherein the determining theadditional amount of insulin is further based on at least one gaincorresponding to one of the at least one state variables.
 5. The methodof claim 1, further comprising repeating, after a predetermined periodof time, the determining at least one state variable, determining anadditional amount of insulin to be delivered to the body of the user,infusing the determined additional amount of insulin to the body of theuser, and reducing the basal rate by said additional amount of insulin.6. The method of claim 1, further including: obtaining a blood glucoseconcentration of the user; determining a bolus amount of insulin basedon the obtained blood glucose concentration; and infusing the determinedbolus amount to the body of the user along with said additional amountof insulin.
 7. The method of claim 6, wherein the determining the bolusamount of insulin includes: generating a controller input based on theblood glucose concentration; generating commands by a proportional plus,integral plus, derivative (PID) controller from the controller input;and determining, based on the commands from the PID controller, thebolus amount of insulin to be delivered to the body of the user.
 8. Themethod of claim 7, wherein the determining a bolus amount of insulin tobe delivered to the body of the user is further based on at least onepreset PID controller gain selected such that the commands generated bythe PID controller cause insulin to be infused into the body of the userin response to a glucose concentration at a rate substantially equal tothe rate that beta cells would release insulin in an individual with ahealthy normally functioning pancreas.
 9. The method of claim 8, whereinthe at least one preset controller gain is selected by a method thatincludes measuring an insulin response of at least one individual with ahealthy normally functioning pancreas and calculating the at least onecontroller gain that causes the commands to substantially match theinsulin response of the at least one individual.
 10. The method of claim6, further including providing a prompt to indicate that the bolusamount of insulin has been determined and receiving an input to indicatethat the bolus amount of insulin should be infused to the user.
 11. Themethod of claim 6, further comprising repeating, after a predeterminedperiod of time, the determining at least one state variable, determiningthe additional amount of insulin to be delivered to the body of theuser, infusing the determined bolus amount of insulin and the determinedadditional amount of insulin to the body of the user, and reducing thebasal rate by said additional amount of insulin.
 12. The method of claim6, wherein: (a) the determining the bolus amount of insulin includes:generating a controller input based on the blood glucose concentration;generating commands by a proportional plus, integral plus, derivative(PID) controller from the controller input; and determining, based onthe commands from the PID controller, the bolus amount of insulin to bedelivered to the body of the user; (b) the at least one state variableis selected from the group consisting of subcutaneous insulinconcentration, plasma insulin concentration, and insulin effect; and (c)the determining the additional amount of insulin is further based on atleast one gain corresponding to one of the at least one state variables.